mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
ships now have their own control manager that the avatar uses when he takes the wheel
This commit is contained in:
parent
f4d998e214
commit
6e32e478cf
@ -13,7 +13,6 @@ from direct.directnotify import DirectNotifyGlobal
|
||||
#if __debug__:
|
||||
# import DevWalker
|
||||
from direct.task import Task
|
||||
|
||||
CollisionHandlerRayStart = 4000.0 # This is a hack, it may be better to use a line instead of a ray.
|
||||
|
||||
class ControlManager:
|
||||
@ -162,6 +161,7 @@ class ControlManager:
|
||||
def delete(self):
|
||||
assert self.notify.debugCall(id(self))
|
||||
self.disable()
|
||||
# TODO: put controls delete code in here
|
||||
del self.controls
|
||||
del self.currentControls
|
||||
|
||||
@ -201,13 +201,21 @@ class ControlManager:
|
||||
def enable(self):
|
||||
assert self.notify.debugCall(id(self))
|
||||
self.isEnabled = 1
|
||||
self.currentControls.enableAvatarControls()
|
||||
if self.currentControls:
|
||||
self.currentControls.enableAvatarControls()
|
||||
|
||||
def disable(self):
|
||||
assert self.notify.debugCall(id(self))
|
||||
self.isEnabled = 0
|
||||
self.currentControls.disableAvatarControls()
|
||||
if self.currentControls:
|
||||
self.currentControls.disableAvatarControls()
|
||||
|
||||
def stop(self):
|
||||
self.disable()
|
||||
self.currentControls.setCollisionsActive(0)
|
||||
self.currentControls.setAvatar(None)
|
||||
self.currentControls = None
|
||||
|
||||
def disableAvatarJump(self):
|
||||
"""
|
||||
prevent
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user