本文整理汇总了Python中CogdoUtil.CogdoGameMovie类的典型用法代码示例。如果您正苦于以下问题:Python CogdoGameMovie类的具体用法?Python CogdoGameMovie怎么用?Python CogdoGameMovie使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CogdoGameMovie类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: load
def load(self):
CogdoGameMovie.load(self)
self._ival = Sequence()
if not self._exit.hasPlayer(self._localPlayer):
loseSfx = base.cogdoGameAudioMgr.createSfx('lose')
self._ival.append(Sequence(Func(loseSfx.play), Func(self._localPlayer.toon.setAnimState, 'Sad')))
self._ival.append(Sequence(Wait(Globals.FinishDurationSeconds - 1.0), Func(base.transitions.irisOut), Wait(1.0)))
示例2: load
def load(self):
self.notify.debug("load()")
CogdoGameMovie.load(self)
backgroundGui = loader.loadModel("phase_5/models/cogdominium/tt_m_gui_csa_flyThru")
self.bg = backgroundGui.find("**/background")
self.chatBubble = backgroundGui.find("**/chatBubble")
self.chatBubble.setScale(6.5, 6.5, 7.3)
self.chatBubble.setPos(0.32, 0, -0.78)
self.bg.setScale(5.2)
self.bg.setPos(0.14, 0, -0.6667)
self.bg.reparentTo(aspect2d)
self.chatBubble.reparentTo(aspect2d)
self.frame = DirectFrame(geom=self.bg, relief=None, pos=(0.2, 0, -0.6667))
self.bg.wrtReparentTo(self.frame)
self.gameTitleText = DirectLabel(
parent=self.frame,
text=TTLocalizer.CogdoExecutiveSuiteTitle,
scale=TTLocalizer.MRPgameTitleText * 0.8,
text_align=TextNode.ACenter,
text_font=getSignFont(),
text_fg=(1.0, 0.33, 0.33, 1.0),
pos=TTLocalizer.MRgameTitleTextPos,
relief=None,
)
self.chatBubble.wrtReparentTo(self.frame)
self.frame.hide()
backgroundGui.removeNode()
self.toonDNA = ToonDNA.ToonDNA()
self.toonDNA.newToonFromProperties("dss", "ss", "m", "m", 2, 0, 2, 2, 1, 8, 1, 8, 1, 14, 0)
self.toonHead = Toon.Toon()
self.toonHead.setDNA(self.toonDNA)
self.makeSuit("sc")
self.toonHead.getGeomNode().setDepthWrite(1)
self.toonHead.getGeomNode().setDepthTest(1)
self.toonHead.loop("neutral")
self.toonHead.setPosHprScale(-0.73, 0, -1.27, 180, 0, 0, 0.18, 0.18, 0.18)
self.toonHead.reparentTo(hidden)
self.toonHead.startBlink()
self.clipPlane = self.toonHead.attachNewNode(PlaneNode("clip"))
self.clipPlane.node().setPlane(Plane(0, 0, 1, 0))
self.clipPlane.setPos(0, 0, 2.45)
self._toonDialogueSfx = loader.loadSfx("phase_3.5/audio/dial/AV_dog_long.ogg")
self._camHelperNode = NodePath("CamHelperNode")
self._camHelperNode.reparentTo(render)
dialogue = TTLocalizer.CogdoMazeGameElevatorRewardLaff
def start():
self.frame.show()
base.setCellsAvailable(base.bottomCells + base.leftCells + base.rightCells, 0)
def end():
self._dialogueLabel.reparentTo(hidden)
self.toonHead.reparentTo(hidden)
self.frame.hide()
base.setCellsAvailable(base.bottomCells + base.leftCells + base.rightCells, 1)
self._stopUpdateTask()
self._ival = Sequence(Func(start), Func(self.displayLine, dialogue), Wait(self.elevatorDuration), Func(end))
self._startUpdateTask()
return
示例3: load
def load(self):
CogdoGameMovie.load(self)
def showDoor():
camera.wrtReparentTo(render)
camera.setPos(self._exit, 0, -55, 40)
camera.lookAt(self._exit, 0, 0, -20)
self._exit.open()
exitDur = 1.0
showExitIval = Sequence(
Func(camera.wrtReparentTo, render),
Parallel(
camera.posInterval(exitDur, Point3(0, -55, 40), other=self._exit, blendType="easeInOut"),
camera.hprInterval(exitDur, Point3(0, -45, 0), blendType="easeInOut"),
),
)
def showPlayersLeaving():
for player in self._players:
self._exit.toonEnters(player.toon)
self._ival = Sequence(
showExitIval,
Func(self._exit.open),
Func(showPlayersLeaving),
Wait(Globals.Gameplay.FinishDurationSeconds - exitDur - 1.0),
Func(base.transitions.irisOut),
Wait(1.0),
)
示例4: __init__
def __init__(self, maze, exit, rng):
CogdoGameMovie.__init__(self)
self._maze = maze
self._exit = exit
self._rng = RandomNumGen(rng)
self._camTarget = None
self._state = 0
self._suits = []
示例5: __init__
def __init__(self, shopOwner):
CogdoGameMovie.__init__(self)
self._shopOwner = shopOwner
self._lookAtCamTarget = False
self._camTarget = None
self._camHelperNode = None
self._toonDialogueSfx = None
self.toonHead = None
self.frame = None
示例6: load
def load(self):
self.notify.debug('load()')
CogdoGameMovie.load(self)
backgroundGui = loader.loadModel('phase_5/models/cogdominium/tt_m_gui_csa_flyThru')
self.bg = backgroundGui.find('**/background')
self.chatBubble = backgroundGui.find('**/chatBubble')
self.chatBubble.setScale(6.5, 6.5, 7.3)
self.chatBubble.setPos(0.32, 0, -0.78)
self.bg.setScale(5.2)
self.bg.setPos(0.14, 0, -0.6667)
self.bg.reparentTo(aspect2d)
self.chatBubble.reparentTo(aspect2d)
self.frame = DirectFrame(geom=self.bg, relief=None, pos=(0.2, 0, -0.6667))
self.bg.wrtReparentTo(self.frame)
self.gameTitleText = DirectLabel(parent=self.frame, text=TTLocalizer.CogdoExecutiveSuiteTitle, scale=TTLocalizer.MRPgameTitleText * 0.8, text_align=TextNode.ACenter, text_font=getSignFont(), text_fg=(1.0, 0.33, 0.33, 1.0), pos=TTLocalizer.MRgameTitleTextPos, relief=None)
self.chatBubble.wrtReparentTo(self.frame)
self.frame.hide()
backgroundGui.removeNode()
self.toonDNA = ToonDNA.ToonDNA()
self.toonDNA.newToonFromProperties('dss', 'ss', 'm', 'm', 2, 0, 2, 2, 1, 8, 1, 8, 1, 14, 0)
self.toonHead = Toon.Toon()
self.toonHead.setDNA(self.toonDNA)
self.makeSuit('sc')
self.toonHead.getGeomNode().setDepthWrite(1)
self.toonHead.getGeomNode().setDepthTest(1)
self.toonHead.loop('neutral')
self.toonHead.setPosHprScale(-0.73, 0, -1.27, 180, 0, 0, 0.18, 0.18, 0.18)
self.toonHead.reparentTo(hidden)
self.toonHead.startBlink()
self.clipPlane = self.toonHead.attachNewNode(PlaneNode('clip'))
self.clipPlane.node().setPlane(Plane(0, 0, 1, 0))
self.clipPlane.setPos(0, 0, 2.45)
self._toonDialogueSfx = loader.loadSfx('phase_3.5/audio/dial/AV_dog_long.ogg')
self._camHelperNode = NodePath('CamHelperNode')
self._camHelperNode.reparentTo(render)
dialogue = TTLocalizer.CogdoExecutiveSuiteIntroMessage
def start():
self.frame.show()
base.setCellsActive(base.bottomCells + base.leftCells + base.rightCells, 0)
def showShopOwner():
self._setCamTarget(self._shopOwner, -10, offset=Point3(0, 0, 5))
def end():
self._dialogueLabel.reparentTo(hidden)
self.toonHead.reparentTo(hidden)
self.frame.hide()
base.setCellsActive(base.bottomCells + base.leftCells + base.rightCells, 1)
self._stopUpdateTask()
self._ival = Sequence(Func(start), Func(self.displayLine, dialogue), Func(showShopOwner), ParallelEndTogether(camera.posInterval(self.cameraMoveDuration, Point3(8, 0, 13), blendType='easeInOut'), camera.hprInterval(0.5, self._camHelperNode.getHpr(), blendType='easeInOut')), Wait(self.introDuration), Func(end))
self._startUpdateTask()
return
示例7: unload
def unload(self):
self.frame.destroy()
del self.frame
self.bg.removeNode()
del self.bg
self.chatBubble.removeNode()
del self.chatBubble
self.toonHead.stopBlink()
self.toonHead.stop()
self.toonHead.removeNode()
self.toonHead.delete()
del self.toonHead
CogdoGameMovie.unload(self)
示例8: unload
def unload(self):
CogdoGameMovie.unload(self)
del self._cogDialogueSfx
del self._toonDialogueSfx
self.toonHead.stopBlink()
self.toonHead.stop()
self.toonHead.removeNode()
self.toonHead.delete()
del self.toonHead
self.cogHead.stop()
self.cogHead.removeNode()
self.cogHead.delete()
del self.cogHead
self._exit = None
self._level = None
示例9: unload
def unload(self):
self._shopOwner = None
self._camTarget = None
if hasattr(self, '_camHelperNode') and self._camHelperNode:
self._camHelperNode.removeNode()
del self._camHelperNode
self.frame.destroy()
del self.frame
self.bg.removeNode()
del self.bg
self.chatBubble.removeNode()
del self.chatBubble
self.toonHead.stopBlink()
self.toonHead.stop()
self.toonHead.removeNode()
self.toonHead.delete()
del self.toonHead
CogdoGameMovie.unload(self)
示例10: unload
def unload(self):
self._exit = None
self._camTarget = None
self._camHelperNode.removeNode()
del self._camHelperNode
for suit in self._suits:
suit.cleanup()
suit.removeNode()
suit.delete()
self._suits = []
CogdoGameMovie.unload(self)
del self._cogDialogueSfx
del self._toonDialogueSfx
self.toonHead.stopBlink()
self.toonHead.stop()
self.toonHead.removeNode()
self.toonHead.delete()
del self.toonHead
self.cogHead.stop()
self.cogHead.removeNode()
self.cogHead.delete()
del self.cogHead
示例11: __init__
def __init__(self, level, rng):
CogdoGameMovie.__init__(self)
self._level = level
self._rng = RandomNumGen(rng)
self._exit = self._level.getExit()
示例12: __init__
def __init__(self, localPlayer, exit):
CogdoGameMovie.__init__(self)
self._localPlayer = localPlayer
self._exit = exit
示例13: __init__
def __init__(self):
CogdoGameMovie.__init__(self)
self._toonDialogueSfx = None
self.toonHead = None
self.frame = None
return