Exemple #1
0
 def __init__(self, cannon):
     CannonGUI.__init__(self, cannon)
     self.exitEvent = None
     self.__dialog = None
     self.helpButton = None
     self.helpUI = None
     self.flashHelp = None
     self.ammoFade = None
     self.__ammoCountersHidden = False
     self.setupExtraButtons()
     self.exitCannon['command'] = self.showExitDialog
     self.volleyLabel.setPos(-0.28, 0, 0.09)
     self.reloadBar.setPos(-0.13, 0, 0.08)
     self.ammoImage.setPos(-0.38, 0, 0.06)
     self.repMeter = ReputationMeter(InventoryType.DefenseCannonRep,
                                     width=0.7)
     self.repMeter.reparentTo(base.a2dBottomCenter)
     self.repMeter.setPos(0.0, 0.0, 0.025)
     self.hud = CannonDefenseHUD()
     self.hud.create()
     self._exp = 0
     self.lastLevel = 1
     self.accept('incDefenseCannonExp', self.increaseExp)
     if __dev__:
         base.dcg = self
     return
 def destroy(self):
     if self.ammoFade:
         self.ammoFade.finish()
         self.ammoFade = None
     
     if self.flashHelp:
         self.flashHelp.finish()
         self.flashHelp = None
     
     if self.helpButton:
         self.helpButton.destroy()
         self.helpButton = None
     
     if self.helpUI:
         self.helpUI.destroy()
         self.helpUI = None
     
     if self.hud:
         self.hud.destroy()
         self.hud = None
     
     base.musicMgr.requestFadeOut(SoundGlobals.MUSIC_MINIGAME_CANNON)
     self.repMeter.destroy()
     self.ignore('incDefenseCannonExp')
     CannonGUI.destroy(self)
Exemple #3
0
 def destroy(self):
     if self.ammoFade:
         self.ammoFade.finish()
         self.ammoFade = None
     
     if self.flashHelp:
         self.flashHelp.finish()
         self.flashHelp = None
     
     if self.helpButton:
         self.helpButton.destroy()
         self.helpButton = None
     
     if self.helpUI:
         self.helpUI.destroy()
         self.helpUI = None
     
     if self.hud:
         self.hud.destroy()
         self.hud = None
     
     base.musicMgr.requestFadeOut(SoundGlobals.MUSIC_MINIGAME_CANNON)
     self.repMeter.destroy()
     self.ignore('incDefenseCannonExp')
     CannonGUI.destroy(self)
 def __init__(self, cannon):
     CannonGUI.__init__(self, cannon)
     self.exitEvent = None
     self._DefenseCannonGUI__dialog = None
     self.helpButton = None
     self.helpUI = None
     self.flashHelp = None
     self.ammoFade = None
     self._DefenseCannonGUI__ammoCountersHidden = False
     self.setupExtraButtons()
     self.exitCannon['command'] = self.showExitDialog
     self.volleyLabel.setPos(-0.28000000000000003, 0, 0.089999999999999997)
     self.reloadBar.setPos(-0.13, 0, 0.080000000000000002)
     self.ammoImage.setPos(-0.38, 0, 0.059999999999999998)
     self.repMeter = ReputationMeter(InventoryType.DefenseCannonRep, width = 0.69999999999999996)
     self.repMeter.reparentTo(base.a2dBottomCenter)
     self.repMeter.setPos(0.0, 0.0, 0.025000000000000001)
     self.hud = CannonDefenseHUD()
     self.hud.create()
     self._exp = 0
     self.lastLevel = 1
     self.accept('incDefenseCannonExp', self.increaseExp)
     if __dev__:
         base.dcg = self