def enterGame(self):
     DistCogdoGame.enterGame(self)
     #self.timer.posInTopRightCorner()
     timeLeft = 15. - (globalClock.getRealTime() - self.getStartTime())
     self.timer.setTime(timeLeft)
     self.timer.countdown(timeLeft, self.timerExpired)
     self.timer.unstash()
Exemplo n.º 2
0
    def enterLoaded(self):
        DistCogdoGame.enterLoaded(self)
        mazeFactory = self.createMazeFactory(self.createRandomNumGen())
        bossCode = None
        if self._numSuits[0] > 0:
            bossCode = ''
            for u in xrange(self._numSuits[0]):
                bossCode += '%X' % self.randomNumGen.randint(0, 15)

        self.game.load(mazeFactory, self._numSuits, bossCode)
Exemplo n.º 3
0
 def exitFinish(self):
     DistCogdoGame.exitFinish(self)
     self.game.endFinish()
     self.game.offstage()
Exemplo n.º 4
0
 def exitGame(self):
     DistCogdoGame.exitGame(self)
     self.game.exit()
Exemplo n.º 5
0
 def exitIntro(self):
     DistCogdoGame.exitIntro(self)
     self.game.endIntro()
     self.stashEntranceElevator()
Exemplo n.º 6
0
 def exitVisible(self):
     DistCogdoGame.exitVisible(self)
Exemplo n.º 7
0
 def exitLoaded(self):
     self.game.unload()
     self.ignoreAll()
     DistCogdoGame.exitLoaded(self)
Exemplo n.º 8
0
 def placeEntranceElev(self, elev):
     DistCogdoGame.placeEntranceElev(self, elev)
     self.game.placeEntranceElevator(elev)
 def announceGenerate(self):
     DistributedLevel.announceGenerate(self)
     DistCogdoGame.announceGenerate(self)
 def enterFinish(self):
     DistCogdoGame.enterFinish(self)
     timeLeft = 10 - (globalClock.getRealTime() - self.getFinishTime())
     self.timer.setTime(timeLeft)
     self.timer.countdown(timeLeft, self.timerExpired)
     self.timer.unstash()
 def disable(self):
     self.timer.destroy()
     self.timer = None
     DistCogdoGame.disable(self)
 def announceGenerate(self):
     DistCogdoGame.announceGenerate(self)
     self.timer = ToontownTimer.ToontownTimer()
     self.timer.stash()
 def delete(self):
     DistCogdoGame.delete(self)
     DistributedLevel.delete(self)
 def disable(self):
     DistCogdoGame.disable(self)
     DistributedLevel.disable(self)
 def generate(self):
     DistributedLevel.generate(self)
     DistCogdoGame.generate(self)
     if __dev__:
         bboard.post(EditorGlobals.EditTargetPostName, self)
    def disable(self):
        if __dev__:
            self.stopHandleEdits()

        DistributedLevel.disable(self)
        DistCogdoGame.disable(self)
 def __init__(self, cr):
     DistCogdoGame.__init__(self, cr)
Exemplo n.º 18
0
 def generate(self):
     self.randomNumGen = self.createRandomNumGen()
     DistCogdoGame.generate(self)
Exemplo n.º 19
0
 def __init__(self, cr):
     DistributedLevel.__init__(self, cr)
     DistCogdoGame.__init__(self, cr)
Exemplo n.º 20
0
 def generate(self):
     DistributedLevel.generate(self)
     DistCogdoGame.generate(self)
     if __dev__:
         bboard.post(EditorGlobals.EditTargetPostName, self)
Exemplo n.º 21
0
 def announceGenerate(self):
     DistributedLevel.announceGenerate(self)
     DistCogdoGame.announceGenerate(self)
     if __dev__:
         self.startHandleEdits()
Exemplo n.º 22
0
 def enterVisible(self):
     DistCogdoGame.enterVisible(self)
     self.game.initPlayers()
     self.game.onstage()
Exemplo n.º 23
0
 def disable(self):
     if __dev__:
         self.stopHandleEdits()
     DistCogdoGame.disable(self)
     DistributedLevel.disable(self)
Exemplo n.º 24
0
 def enterIntro(self):
     DistCogdoGame.enterIntro(self, Globals.IntroDurationSeconds)
     self.game.startIntro()
Exemplo n.º 25
0
 def delete(self):
     DistCogdoGame.delete(self)
     DistributedLevel.delete(self)
     if __dev__:
         bboard.removeIfEqual(EditorGlobals.EditTargetPostName, self)
Exemplo n.º 26
0
 def enterGame(self):
     DistCogdoGame.enterGame(self)
     self.game.start()
Exemplo n.º 27
0
 def __init__(self, cr):
     DistCogdoGame.__init__(self, cr)
     self.game = CogdoMazeGame(self)
     self._numSuits = (0, 0, 0)
Exemplo n.º 28
0
 def enterFinish(self):
     DistCogdoGame.enterFinish(self)
     self.game.startFinish()
Exemplo n.º 29
0
 def delete(self):
     del self.randomNumGen
     del self.game
     DistCogdoGame.delete(self)
 def __init__(self, cr):
     DistributedLevel.__init__(self, cr)
     DistCogdoGame.__init__(self, cr)
Exemplo n.º 31
0
 def setToonSad(self, toonId):
     DistCogdoGame.setToonSad(self, toonId)
     self.game.handleToonWentSad(toonId)
 def announceGenerate(self):
     DistributedLevel.announceGenerate(self)
     DistCogdoGame.announceGenerate(self)
     if __dev__:
         self.startHandleEdits()
Exemplo n.º 33
0
 def setToonDisconnect(self, toonId):
     DistCogdoGame.setToonDisconnect(self, toonId)
     self.game.handleToonDisconnected(toonId)
 def delete(self):
     DistributedLevel.delete(self)
     DistCogdoGame.delete(self)
     if __dev__:
         bboard.removeIfEqual(EditorGlobals.EditTargetPostName, self)
 def generate(self):
     DistributedLevel.generate(self)
     DistCogdoGame.generate(self)