def load(self): self.notify.debug("load") DistributedMinigame.load(self) # load resources and create objects here self.__defineConstants() mazeName = MazeGameGlobals.getMazeName(self.doId, self.numPlayers, MazeData.mazeNames) self.maze = Maze.Maze(mazeName) model = loader.loadModel("phase_3.5/models/props/mickeySZ") self.treasureModel = model.find("**/mickeySZ") model.removeNode() self.treasureModel.setScale(1.6) #self.treasureModel.setP(-80) # tilt the mickey heads toward the camera self.treasureModel.setP(-90) self.music = base.loadMusic( "phase_4/audio/bgm/MG_toontag.mid" #"phase_4/audio/bgm/TC_SZ.mid" ) # make a dictionary of tracks for showing each toon # getting hit by a suit self.toonHitTracks = {} self.scorePanels = [] if __debug__: # this flag will allow you to walk right through suits self.cheat = config.GetBool('maze-game-cheat', 0)
def setGameReady(self): self.notify.debug('setGameReady') DistributedMinigameAI.setGameReady(self) mazeName = MazeGameGlobals.getMazeName(self.doId, self.numPlayers, MazeData.mazeNames) mData = MazeData.mazeData[mazeName] self.numTreasures = len(mData['treasurePosList']) self.numTreasuresTaken = 0 self.takenTable = [0] * self.numTreasures for avId in self.scoreDict.keys(): self.scoreDict[avId] = 0
def load(self): self.notify.debug('load') DistributedMinigame.load(self) self.__defineConstants() mazeName = MazeGameGlobals.getMazeName(self.doId, self.numPlayers, MazeData.mazeNames) self.maze = Maze.Maze(mazeName) model = loader.loadModel('phase_3.5/models/props/mickeySZ') self.treasureModel = model.find('**/mickeySZ') model.removeNode() self.treasureModel.setScale(1.6) self.treasureModel.setP(-90) self.music = base.loader.loadMusic('phase_4/audio/bgm/MG_toontag.ogg') self.toonHitTracks = {} self.scorePanels = []
def load(self): self.notify.debug('load') DistributedMinigame.load(self) self.__defineConstants() mazeName = MazeGameGlobals.getMazeName(self.doId, self.numPlayers, MazeData.mazeNames) self.maze = Maze.Maze(mazeName) model = loader.loadModel('phase_3.5/models/props/mickeySZ') self.treasureModel = model.find('**/mickeySZ') model.removeNode() self.treasureModel.setScale(1.6) self.treasureModel.setP(-90) self.music = base.loadMusic('phase_4/audio/bgm/MG_toontag.ogg') self.toonHitTracks = {} self.scorePanels = []
def setGameReady(self): self.notify.debug("setGameReady") DistributedMinigameAI.setGameReady(self) # all of the players have checked in # they will now be shown the rules # get maze dimensions, boolean collision array mazeName = MazeGameGlobals.getMazeName(self.doId, self.numPlayers, MazeData.mazeNames) mData = MazeData.mazeData[mazeName] self.numTreasures = len(mData["treasurePosList"]) self.numTreasuresTaken = 0 self.takenTable = [0] * self.numTreasures # reset scores for avId in self.scoreDict.keys(): self.scoreDict[avId] = 0