def release(self): """ deactivates the reverb and calls fmod reverb release """ self._reverb.active = False FMOD.update() # if you dont call system.update before releasing an object, all the changes made to it are not applied self._reverb.release() self._reverb = None
for gameObject in gameObjects: handled = gameObject.handleInput(e) if handled: break currentTime = pygame.time.get_ticks() # deltaTime in seconds. deltaTime = (currentTime - lastFrameTime) / 1000.0 # update for gameObject in gameObjects: gameObject.update(deltaTime) # render for gameObject in gameObjects: gameObject.render(screen) # dumps data into the screen lastFrameTime = currentTime pygame.display.update() FMOD.update() clock.tick(30) # ------------------------------------QUIT------------------------ for gameObject in gameObjects: gameObject.release() resourcesManager.release() FMOD.release() pygame.display.quit() pygame.quit() sys.exit()