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

View File

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