def __init__(self): ShowBase.__init__(self) # Load the environment model. self.environ = self.loader.loadModel("models/environment") # Reparent the model to render. self.environ.reparentTo(self.render) # Apply scale and position transforms on the model. self.environ.setScale(0.25, 0.25, 0.25) self.environ.setPos(-8, 42, 0) # Add the spinCameraTask procedure to the task manager. self.taskMgr.add(self.spinCameraTask, "SpinCameraTask")
def __init__(self): ShowBase.__init__(self) FSM.__init__(self, "FSM-Game") # self.win base.enableParticles() self.playerName = "" self.IsFullScreen = False self.blade_runner = player.Player(self.playerName) self.disableMouse() self.plight = PointLight("plight") self.plight.setColor((1, 1, 1, 1)) self.plnp = self.render.attachNewNode(self.plight) self.render.setLight(self.plnp) self.windowProps = WindowProperties() self.intro = logoscreen.Logoscreen() self.intro.start() self.crawl = crawl.testCrawl() self.accept('1', self.crawl.start) self.menu = menu.Menu(self.windowProps, self) self.accept('2', self.menu.start) self.l1 = level1.Level1() self.accept('3', self.l1.start) self.l2 = level2.Level2() self.accept('4', self.l2.start) self.l3 = level3.Level3() self.accept('5', self.l3.start) self.l4 = level4.Level4() self.accept('6', self.l4.start) #ENDGAME SCREEN WITH REPORT self.end = endgame.Endgame() self.accept('7', self.end.start)