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))
    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 offstage(self):
     self._waterCoolerRoot.stash()
     MazeBase.offstage(self)
 def onstage(self):
     MazeBase.onstage(self)
     self._waterCoolerRoot.unstash()