def __init__(self,
              mapName,
              mazeData=MazeData.mazeData,
              cellWidth=MazeData.CELL_WIDTH):
     model = loader.loadModel(mapName)
     mData = mazeData[mapName]
     self.treasurePosList = mData['treasurePosList']
     self.numTreasures = len(self.treasurePosList)
     MazeBase.__init__(self, model, mData, cellWidth)
Exemplo n.º 2
0
 def __init__(self, model, data, cellWidth):
     MazeBase.__init__(self, model, data, cellWidth)
     self._initWaterCoolers()
     self.elevatorPos = self.maze.find('**/elevator_loc').getPos(render)
     self.exitPos = self.maze.find('**/exit_loc').getPos(render)
     self.maze.flattenStrong()
     self._clearColor = VBase4(base.win.getClearColor())
     self._clearColor.setW(1.0)
     base.win.setClearColor(VBase4(0.0, 0.0, 0.0, 1.0))
Exemplo n.º 3
0
 def __init__(self, model, data, cellWidth):
     MazeBase.__init__(self, model, data, cellWidth)
     self._initWaterCoolers()
     self.elevatorPos = self.maze.find('**/elevator_loc').getPos(render)
     self.exitPos = self.maze.find('**/exit_loc').getPos(render)
     self.maze.flattenStrong()
     self._clearColor = VBase4(base.win.getClearColor())
     self._clearColor.setW(1.0)
     base.win.setClearColor(VBase4(0.0, 0.0, 0.0, 1.0))
Exemplo n.º 4
0
    def destroy(self):
        for waterCooler in self._waterCoolers:
            waterCooler.destroy()

        del self._waterCoolers
        self._waterCoolerRoot.removeNode()
        del self._waterCoolerRoot
        base.win.setClearColor(self._clearColor)
        del self._clearColor
        MazeBase.destroy(self)
Exemplo n.º 5
0
    def destroy(self):
        for waterCooler in self._waterCoolers:
            waterCooler.destroy()

        del self._waterCoolers
        self._waterCoolerRoot.removeNode()
        del self._waterCoolerRoot
        base.win.setClearColor(self._clearColor)
        del self._clearColor
        MazeBase.destroy(self)
 def __init__(self, model, data, cellWidth):
     MazeBase.__init__(self, model, data, cellWidth)
     self._initWaterCoolers()
     self.elevatorPos = self.maze.find('**/elevator_loc').getPos(render)
     self.exitPos = self.maze.find('**/exit_loc').getPos(render)
     self.maze.flattenStrong()
     self._clearColor = VBase4(base.win.getClearColor())
     self._clearColor.setW(1.0)
     base.win.setClearColor(VBase4(0.0, 0.0, 0.0, 1.0))
     if __debug__ and base.config.GetBool('cogdomaze-dev', False):
         self._initCollisionVisuals()
Exemplo n.º 7
0
 def __init__(self, model, data, cellWidth):
     MazeBase.__init__(self, model, data, cellWidth)
     self._initWaterCoolers()
     self.elevatorPos = self.maze.find('**/elevator_loc').getPos(render)
     self.exitPos = self.maze.find('**/exit_loc').getPos(render)
     self.maze.flattenStrong()
     self._clearColor = VBase4(base.win.getClearColor())
     self._clearColor.setW(1.0)
     base.win.setClearColor(VBase4(0.0, 0.0, 0.0, 1.0))
     if 0 and base.config.GetBool('cogdomaze-dev', False):
         self._initCollisionVisuals()
    def destroy(self):
        for waterCooler in self._waterCoolers:
            waterCooler.destroy()

        del self._waterCoolers
        self._waterCoolerRoot.removeNode()
        del self._waterCoolerRoot
        base.win.setClearColor(self._clearColor)
        del self._clearColor
        MazeBase.destroy(self)
        if __debug__ and hasattr(self, '_cubes'):
            self.ignoreAll()
            self._cubes.removeNode()
            del self._cubes
Exemplo n.º 9
0
    def destroy(self):
        for waterCooler in self._waterCoolers:
            waterCooler.destroy()

        del self._waterCoolers
        self._waterCoolerRoot.removeNode()
        del self._waterCoolerRoot
        base.win.setClearColor(self._clearColor)
        del self._clearColor
        MazeBase.destroy(self)
        if 0 and hasattr(self, '_cubes'):
            self.ignoreAll()
            self._cubes.removeNode()
            del self._cubes
Exemplo n.º 10
0
 def offstage(self):
     self._waterCoolerRoot.stash()
     MazeBase.offstage(self)
Exemplo n.º 11
0
 def onstage(self):
     MazeBase.onstage(self)
     self._waterCoolerRoot.unstash()
Exemplo n.º 12
0
 def offstage(self):
     self._waterCoolerRoot.stash()
     MazeBase.offstage(self)
Exemplo n.º 13
0
 def onstage(self):
     MazeBase.onstage(self)
     self._waterCoolerRoot.unstash()