mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
Add missing libarary import and add a function to cleanup properly
This commit is contained in:
parent
cd33f54950
commit
135b484657
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
__all__ = ['Audio3DManager']
|
__all__ = ['Audio3DManager']
|
||||||
|
|
||||||
from pandac.PandaModules import VBase3
|
from pandac.PandaModules import Vec3, VBase3
|
||||||
from direct.task import Task
|
from direct.task import Task
|
||||||
#
|
#
|
||||||
class Audio3DManager:
|
class Audio3DManager:
|
||||||
@ -272,3 +272,14 @@ class Audio3DManager:
|
|||||||
else:
|
else:
|
||||||
self.audio_manager.audio3dSetListenerAttributes(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1)
|
self.audio_manager.audio3dSetListenerAttributes(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1)
|
||||||
return Task.cont
|
return Task.cont
|
||||||
|
|
||||||
|
def disable(self):
|
||||||
|
"""
|
||||||
|
Detaches any existing sounds and removes the update task
|
||||||
|
"""
|
||||||
|
taskMgr.remove("Audio3DManager-updateTask")
|
||||||
|
self.detachListener()
|
||||||
|
for object in self.sound_dict.keys():
|
||||||
|
for sound in self.sound_dict[object]:
|
||||||
|
self.detachSound(sound)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user