def __init__(self, cr):
     DistributedShipCannon.__init__(self, cr)
     self.tutorial = 1
     self.cannonMoved = 0
     self.cannonExitShown = 0
     self.moveCannonPanel = None
     self.fireCannonPanel = None
     self.exitCannonPanel = None
     self.setIgnoreProximity(True)
Пример #2
0
 def exitFireCannon(self):
     DistributedShipCannon.exitFireCannon(self)
     taskMgr.remove(self.uniqueName('moveCannonPanelPause'))
     taskMgr.remove(self.uniqueName('fireCannonPanelPause'))
     if self.moveCannonPanel:
         self.moveCannonPanel.hide()
         self.moveCannonPanel.destroy()
         self.moveCannonPanel = None
     if self.fireCannonPanel:
         self.fireCannonPanel.hide()
         self.fireCannonPanel.destroy()
         self.fireCannonPanel = None
     if self.exitCannonPanel:
         self.exitCannonPanel.hide()
         self.exitCannonPanel.destroy()
         self.exitCannonPanel = None
     messenger.send('exitedCannon')
     return
Пример #3
0
 def enterFireCannon(self):
     DistributedShipCannon.enterFireCannon(self)
     self.power = 0.8
     messenger.send('usedCannon')
     base.localAvatar.guiMgr.setIgnoreEscapeHotKey(True)
     self.cgui.exitCannon.hide()
     self.ignore(InteractiveBase.END_INTERACT_EVENT)
     if self.cannonMoved == 0:
         self.moveCannonPanel = NewTutorialPanel(['moveCannon'])
         self.moveCannonPanel.hide()
         taskMgr.add(self.watchForCannonMovementTask,
                     self.uniqueName('cannonMoveWatchTask'))
         taskMgr.doMethodLater(2.0,
                               self.moveCannonPanel.activate,
                               self.uniqueName('moveCannonPanelPause'),
                               extraArgs=[])
     self.fireCannonPanel = NewTutorialPanel(
         ['fireCannon', '\n', 'shipCombatInstruction', 1])
     self.fireCannonPanel.hide()
 def exitFireCannon(self):
     DistributedShipCannon.exitFireCannon(self)
     taskMgr.remove(self.uniqueName('moveCannonPanelPause'))
     taskMgr.remove(self.uniqueName('fireCannonPanelPause'))
     if self.moveCannonPanel:
         self.moveCannonPanel.hide()
         self.moveCannonPanel.destroy()
         self.moveCannonPanel = None
     
     if self.fireCannonPanel:
         self.fireCannonPanel.hide()
         self.fireCannonPanel.destroy()
         self.fireCannonPanel = None
     
     if self.exitCannonPanel:
         self.exitCannonPanel.hide()
         self.exitCannonPanel.destroy()
         self.exitCannonPanel = None
     
     messenger.send('exitedCannon')
 def enterFireCannon(self):
     DistributedShipCannon.enterFireCannon(self)
     self.power = 0.80000000000000004
     messenger.send('usedCannon')
     base.localAvatar.guiMgr.setIgnoreEscapeHotKey(True)
     self.cgui.exitCannon.hide()
     self.ignore(InteractiveBase.END_INTERACT_EVENT)
     if self.cannonMoved == 0:
         self.moveCannonPanel = NewTutorialPanel([
             'moveCannon'])
         self.moveCannonPanel.hide()
         taskMgr.add(self.watchForCannonMovementTask, self.uniqueName('cannonMoveWatchTask'))
         taskMgr.doMethodLater(2.0, self.moveCannonPanel.activate, self.uniqueName('moveCannonPanelPause'), extraArgs = [])
     
     self.fireCannonPanel = NewTutorialPanel([
         'fireCannon',
         '\n',
         'shipCombatInstruction',
         1])
     self.fireCannonPanel.hide()
Пример #6
0
 def fireCannon(self):
     DistributedShipCannon.fireCannon(self)
     messenger.send('firedCannon')
Пример #7
0
 def startWeapon(self, av):
     DistributedShipCannon.startWeapon(self, av)
     if av == base.localAvatar:
         base.localAvatar.guiMgr.combatTray.hide()
Пример #8
0
 def disable(self):
     taskMgr.remove(self.uniqueName('moveCannonPanelPause'))
     taskMgr.remove(self.uniqueName('cannonMoveWatchTask'))
     DistributedShipCannon.disable(self)
 def fireCannon(self):
     DistributedShipCannon.fireCannon(self)
     messenger.send('firedCannon')
 def startWeapon(self, av):
     DistributedShipCannon.startWeapon(self, av)
     if av == base.localAvatar:
         base.localAvatar.guiMgr.combatTray.hide()
 def disable(self):
     taskMgr.remove(self.uniqueName('moveCannonPanelPause'))
     taskMgr.remove(self.uniqueName('cannonMoveWatchTask'))
     DistributedShipCannon.disable(self)