Changed upondDeath assignments to call setUponDeath

This commit is contained in:
Gyedo Jeon 2008-11-06 21:40:34 +00:00
parent 9d7b4496c2
commit 2e22468684
2 changed files with 9 additions and 9 deletions

View File

@ -537,7 +537,7 @@ class DirectCameraControl(DirectObject):
task = 'manipulateCamera')
# Upon death, reparent Cam to parent
t.parent = parent
t.uponDeath = self.reparentCam
t.setUponDeath(self.reparentCam)
def centerCam(self):
self.centerCamIn(1.0)
@ -560,7 +560,7 @@ class DirectCameraControl(DirectObject):
other = self.camManipRef,
blendType = 'easeInOut',
task = 'manipulateCamera')
t.uponDeath = self.updateCoaMarkerSizeOnDeath
t.setUponDeath(self.updateCoaMarkerSizeOnDeath)
def zoomCam(self, zoomFactor, t):
taskMgr.remove('manipulateCamera')
@ -577,7 +577,7 @@ class DirectCameraControl(DirectObject):
other = self.camManipRef,
blendType = 'easeInOut',
task = 'manipulateCamera')
t.uponDeath = self.updateCoaMarkerSizeOnDeath
t.setUponDeath(self.updateCoaMarkerSizeOnDeath)
def spawnMoveToView(self, view):
# Kill any existing tasks
@ -627,7 +627,7 @@ class DirectCameraControl(DirectObject):
other = self.camManipRef,
blendType = 'easeInOut',
task = 'manipulateCamera')
t.uponDeath = self.updateCoaMarkerSizeOnDeath
t.setUponDeath(self.updateCoaMarkerSizeOnDeath)
def swingCamAboutWidget(self, degrees, t):
@ -651,7 +651,7 @@ class DirectCameraControl(DirectObject):
task = 'manipulateCamera')
# Upon death, reparent Cam to parent
manipTask.parent = parent
manipTask.uponDeath = self.reparentCam
manipTask.setUponDeath(self.reparentCam)
def reparentCam(self, state):
base.direct.camera.wrtReparentTo(state.parent)
@ -693,7 +693,7 @@ class DirectCameraControl(DirectObject):
task = 'manipulateCamera')
# Upon death, reparent Cam to parent
fitTask.parent = parent
fitTask.uponDeath = self.reparentCam
fitTask.setUponDeath(self.reparentCam)
def moveToFit(self):
# How big is the active widget?
@ -720,7 +720,7 @@ class DirectCameraControl(DirectObject):
other = base.direct.camera,
blendType = 'easeInOut',
task = 'moveToFitTask')
t.uponDeath = lambda state: taskMgr.remove('stickToWidget')
t.setUponDeath(lambda state: taskMgr.remove('stickToWidget'))
def stickToWidgetTask(self, state):
# Move the objects with the widget

View File

@ -297,7 +297,7 @@ class DirectSession(DirectObject):
task = 'manipulateCamera',
blendType = 'easeInOut')
# When move is done, switch to oobe mode
t.uponDeath = self.endOOBE
t.setUponDeath(self.endOOBE)
else:
# Place camera marker at true camera location
self.oobeVis.reparentTo(self.trueCamera)
@ -320,7 +320,7 @@ class DirectSession(DirectObject):
task = 'manipulateCamera',
blendType = 'easeInOut')
# When move is done, switch to oobe mode
t.uponDeath = self.beginOOBE
t.setUponDeath(self.beginOOBE)
def beginOOBE(self, state):
# Make sure we've reached our final destination