toon: fix more camera lerps
This commit is contained in:
parent
5d4bb8c5a0
commit
7e777ca776
3 changed files with 25 additions and 9 deletions
|
@ -105,7 +105,7 @@ class DistributedNPCClerk(DistributedNPCToonBase):
|
|||
self.setupAvatars(self.av)
|
||||
if self.isLocalToon:
|
||||
camera.wrtReparentTo(render)
|
||||
self.lerpCameraSeq = LerpPosQuatInterval(camera, 1, Point3(-5, 9, self.getHeight() - 0.5), Point3(-150, -2, 0), other=self, blendType='easeOut', name=self.uniqueName('lerpCamera'))
|
||||
self.lerpCameraSeq = camera.posQuatInterval(1, Point3(-5, 9, self.getHeight() - 0.5), Point3(-150, -2, 0), other=self, blendType='easeOut', name=self.uniqueName('lerpCamera'))
|
||||
self.lerpCameraSeq.start()
|
||||
self.setChatAbsolute(TTLocalizer.STOREOWNER_GREETING, CFSpeech | CFTimeout)
|
||||
if self.isLocalToon:
|
||||
|
|
|
@ -20,12 +20,15 @@ class DistributedNPCPetclerk(DistributedNPCToonBase):
|
|||
self.petshopGui = None
|
||||
self.petSeeds = None
|
||||
self.waitingForPetSeeds = False
|
||||
self.lerpCameraSeq = None
|
||||
return
|
||||
|
||||
def disable(self):
|
||||
self.ignoreAll()
|
||||
taskMgr.remove(self.uniqueName('popupPetshopGUI'))
|
||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
||||
if self.lerpCameraSeq:
|
||||
self.lerpCameraSeq.finish()
|
||||
self.lerpCameraSeq = None
|
||||
if self.popupInfo:
|
||||
self.popupInfo.destroy()
|
||||
self.popupInfo = None
|
||||
|
@ -79,7 +82,9 @@ class DistributedNPCPetclerk(DistributedNPCToonBase):
|
|||
def resetPetshopClerk(self):
|
||||
self.ignoreAll()
|
||||
taskMgr.remove(self.uniqueName('popupPetshopGUI'))
|
||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
||||
if self.lerpCameraSeq:
|
||||
self.lerpCameraSeq.finish()
|
||||
self.lerpCameraSeq = None
|
||||
if self.petshopGui:
|
||||
self.petshopGui.destroy()
|
||||
self.petshopGui = None
|
||||
|
@ -112,7 +117,9 @@ class DistributedNPCPetclerk(DistributedNPCToonBase):
|
|||
if mode == NPCToons.SELL_MOVIE_CLEAR:
|
||||
return
|
||||
if mode == NPCToons.SELL_MOVIE_TIMEOUT:
|
||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
||||
if self.lerpCameraSeq:
|
||||
self.lerpCameraSeq.finish()
|
||||
self.lerpCameraSeq = None
|
||||
if self.isLocalToon:
|
||||
self.ignoreEventDict()
|
||||
if self.popupInfo:
|
||||
|
@ -132,7 +139,8 @@ class DistributedNPCPetclerk(DistributedNPCToonBase):
|
|||
self.setupAvatars(self.av)
|
||||
if self.isLocalToon:
|
||||
camera.wrtReparentTo(render)
|
||||
camera.lerpPosHpr(-5, 9, base.localAvatar.getHeight() - 0.5, -150, -2, 0, 1, other=self, blendType='easeOut', task=self.uniqueName('lerpCamera'))
|
||||
self.lerpCameraSeq = camera.posQuatInterval(1, Point3(-5, 9, base.localAvatar.getHeight() - 0.5), Point3(-150, -2, 0), other=self, blendType='easeOut', name=self.uniqueName('lerpCamera'))
|
||||
self.lerpCameraSeq.start()
|
||||
if self.isLocalToon:
|
||||
taskMgr.doMethodLater(1.0, self.popupPetshopGUI, self.uniqueName('popupPetshopGUI'))
|
||||
elif mode == NPCToons.SELL_MOVIE_COMPLETE:
|
||||
|
|
|
@ -21,12 +21,15 @@ class DistributedNPCTailor(DistributedNPCToonBase):
|
|||
self.roomAvailable = 0
|
||||
self.button = None
|
||||
self.popupInfo = None
|
||||
self.lerpCameraSeq = None
|
||||
return
|
||||
|
||||
def disable(self):
|
||||
self.ignoreAll()
|
||||
taskMgr.remove(self.uniqueName('popupPurchaseGUI'))
|
||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
||||
if self.lerpCameraSeq:
|
||||
self.lerpCameraSeq.finish()
|
||||
self.lerpCameraSeq = None
|
||||
if self.clothesGUI:
|
||||
self.clothesGUI.exit()
|
||||
self.clothesGUI.unload()
|
||||
|
@ -61,7 +64,9 @@ class DistributedNPCTailor(DistributedNPCToonBase):
|
|||
def resetTailor(self):
|
||||
self.ignoreAll()
|
||||
taskMgr.remove(self.uniqueName('popupPurchaseGUI'))
|
||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
||||
if self.lerpCameraSeq:
|
||||
self.lerpCameraSeq.finish()
|
||||
self.lerpCameraSeq = None
|
||||
if self.clothesGUI:
|
||||
self.clothesGUI.hideButtons()
|
||||
self.clothesGUI.exit()
|
||||
|
@ -91,7 +96,9 @@ class DistributedNPCTailor(DistributedNPCToonBase):
|
|||
if mode == NPCToons.PURCHASE_MOVIE_CLEAR:
|
||||
return
|
||||
if mode == NPCToons.PURCHASE_MOVIE_TIMEOUT:
|
||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
||||
if self.lerpCameraSeq:
|
||||
self.lerpCameraSeq.finish()
|
||||
self.lerpCameraSeq = None
|
||||
if self.isLocalToon:
|
||||
self.ignore(self.purchaseDoneEvent)
|
||||
self.ignore(self.swapEvent)
|
||||
|
@ -124,7 +131,8 @@ class DistributedNPCTailor(DistributedNPCToonBase):
|
|||
self.setupAvatars(self.av)
|
||||
if self.isLocalToon:
|
||||
camera.wrtReparentTo(render)
|
||||
camera.lerpPosHpr(-5, 9, self.getHeight() - 0.5, -150, -2, 0, 1, other=self, blendType='easeOut', task=self.uniqueName('lerpCamera'))
|
||||
self.lerpCameraSeq = camera.posQuatInterval(1, Point3(-5, 9, self.getHeight() - 0.5), Point3(-150, -2, 0), other=self, blendType='easeOut', name=self.uniqueName('lerpCamera'))
|
||||
self.lerpCameraSeq.start()
|
||||
if self.browsing == 0:
|
||||
if self.roomAvailable == 0:
|
||||
self.setChatAbsolute(TTLocalizer.STOREOWNER_NOROOM, CFSpeech | CFTimeout)
|
||||
|
|
Loading…
Reference in a new issue