예제 #1
0
    def load(self):
        if self._isLoaded:
            return
        self.timer = ToontownTimer.ToontownTimer()
        self.timer.stash()
        self.model = loader.loadModel(CogdoBarrelRoomConsts.BarrelRoomModel)
        self.model.setPos(*CogdoBarrelRoomConsts.BarrelRoomModelPos)
        self.model.reparentTo(render)
        self.model.stash()
        self.entranceNode = self.model.attachNewNode('door-entrance')
        self.entranceNode.setPos(0, -65, 0)
        self.nearBattleNode = self.model.attachNewNode('near-battle')
        self.nearBattleNode.setPos(0, -25, 0)
        self.rewardUi = CogdoBarrelRoomRewardPanel.CogdoBarrelRoomRewardPanel()
        self.hideRewardUi()
        self.stomperSfx = base.loader.loadSfx(CogdoBarrelRoomConsts.StomperSound)
        self.fog = Fog('barrel-room-fog')
        self.fog.setColor(CogdoBarrelRoomConsts.BarrelRoomFogColor)
        self.fog.setLinearRange(*CogdoBarrelRoomConsts.BarrelRoomFogLinearRange)
        self.brBarrel = render.attachNewNode('@@CogdoBarrels')
        for i in range(len(CogdoBarrelRoomConsts.BarrelProps)):
            self.bPath = self.brBarrel.attachNewNode('%s%s' % (CogdoBarrelRoomConsts.BarrelPathName, i))
            self.bPath.setPos(CogdoBarrelRoomConsts.BarrelProps[i]['pos'])
            self.bPath.setH(CogdoBarrelRoomConsts.BarrelProps[i]['heading'])

        self._isLoaded = True
예제 #2
0
 def load(self):
     if self._isLoaded:
         return
     self.timer = ToontownTimer.ToontownTimer()
     self.timer.stash()
     self.model = loader.loadModel(CogdoBarrelRoomConsts.BarrelRoomModel)
     self.model.setPos(*CogdoBarrelRoomConsts.BarrelRoomModelPos)
     self.model.reparentTo(render)
     self.model.stash()
     self.dummyElevInNode = self.model.attachNewNode('elevator-in')
     self.dummyElevInNode.hide()
     self.entranceNode = self.model.attachNewNode('door-entrance')
     self.entranceNode.setPos(0, -65, 0)
     self.nearBattleNode = self.model.attachNewNode('near-battle')
     self.nearBattleNode.setPos(0, -25, 0)
     self.rewardUi = CogdoBarrelRoomRewardPanel.CogdoBarrelRoomRewardPanel()
     self.hideRewardUi()
     self.stomperSfx = base.loadSfx(CogdoBarrelRoomConsts.StomperSound)
     self.fog = Fog('barrel-room-fog')
     self.fog.setColor(CogdoBarrelRoomConsts.BarrelRoomFogColor)
     self.fog.setLinearRange(*CogdoBarrelRoomConsts.BarrelRoomFogLinearRange)
     self._isLoaded = True