Ejemplo n.º 1
0
 def __init__(self, proxy, ctxType):
     super(_MultiteamFalloutPanel, self).__init__(proxy, ctxType)
     self.__hasGasAttack = hasGasAttack()
     self.__allyScore = 0
     self.__enemyScore = 0
     if self.__hasGasAttack:
         g_sessionProvider.getGasAttackCtrl().onPreparing += self.__onGasAttackPreparing
         g_sessionProvider.getGasAttackCtrl().onStarted += self.__onGasAttackStarted
Ejemplo n.º 2
0
 def start(self, ui, battleProxy):
     self.__ui = weakref.proxy(ui)
     self.__battle = battleProxy
     self.__ui.start(self.__vehicles)
     if hasGasAttack():
         self.__gasAttackMgr.onAttackPreparing += self.__onGasAttack
         self.__gasAttackMgr.onAttackStarted += self.__onGasAttack
     if self.__respawnInfo is not None:
         self.__show()
     return
Ejemplo n.º 3
0
 def __init__(self, proxy, ctxType):
     super(_MultiteamFalloutPanel, self).__init__(proxy, ctxType)
     self.__hasGasAttack = hasGasAttack()
     self.__allyScore = 0
     self.__enemyScore = 0
     if self.__hasGasAttack:
         g_sessionProvider.getGasAttackCtrl(
         ).onPreparing += self.__onGasAttackPreparing
         g_sessionProvider.getGasAttackCtrl(
         ).onStarted += self.__onGasAttackStarted
Ejemplo n.º 4
0
 def start(self):
     self.__isHasGasAttack = hasGasAttack()
     if self._populate(self.__ui.getMember(DAMAGE_PANEL_PATH)):
         self.__tankIndicator = _TankIndicatorCtrl(self.__ui)
         ctrl = g_sessionProvider.getVehicleStateCtrl()
         ctrl.onVehicleControlling += self.__onVehicleControlling
         ctrl.onVehicleStateUpdated += self.__onVehicleStateUpdated
         vehicle = ctrl.getControllingVehicle()
         if vehicle:
             self._updatePlayerInfo(vehicle.id)
             self.__onVehicleControlling(vehicle)
Ejemplo n.º 5
0
 def stop(self):
     if self.__showUICallback is not None:
         BigWorld.cancelCallback(self.__showUICallback)
         self.__showUICallback = None
     self.__stopTimer()
     if hasGasAttack():
         self.__gasAttackMgr.onAttackPreparing -= self.__onGasAttack
         self.__gasAttackMgr.onAttackStarted -= self.__onGasAttack
         self.__gasAttackMgr = None
     self.__ui = None
     self.__battle = None
     return
Ejemplo n.º 6
0
 def __init__(self, ctx):
     super(RespawnsController, self).__init__()
     self.__ui = None
     self.__battle = None
     self.__vehicles = []
     self.__cooldowns = {}
     self.__respawnInfo = None
     self.__timerCallback = None
     self.__showUICallback = None
     self.__respawnSndName = 'respawn'
     self.__gasAttackMgr = None
     if hasGasAttack():
         self.__gasAttackMgr = ctx.gasAttackMgr
     return
Ejemplo n.º 7
0
 def __init__(self, ctx):
     super(RespawnsController, self).__init__()
     self.__ui = None
     self.__isUIInited = False
     self.__battle = None
     self.__vehicles = []
     self.__cooldowns = {}
     self.__respawnInfo = None
     self.__timerCallback = None
     self.__showUICallback = None
     self.__respawnSndName = 'respawn'
     self.__gasAttackMgr = None
     if hasGasAttack():
         self.__gasAttackMgr = ctx.gasAttackMgr
     return
Ejemplo n.º 8
0
 def start(self):
     """
     Routine invokes when battle interface is created - player joined to arena.
     """
     self.__isHasGasAttack = hasGasAttack()
     if self._populate(self.__ui.getMember(DAMAGE_PANEL_PATH)):
         self.__tankIndicator = _TankIndicatorCtrl(self.__ui)
         ctrl = g_sessionProvider.getVehicleStateCtrl()
         ctrl.onVehicleControlling += self.__onVehicleControlling
         ctrl.onVehicleStateUpdated += self.__onVehicleStateUpdated
         g_sessionProvider.addArenaCtrl(self)
         vehicle = ctrl.getControllingVehicle()
         if vehicle:
             self.__vehicleID = vehicle.id
             self._updatePlayerInfo(vehicle.id)
             self.__onVehicleControlling(vehicle)
Ejemplo n.º 9
0
 def start(self):
     """
     Routine invokes when battle interface is created - player joined to arena.
     """
     self.__isHasGasAttack = hasGasAttack()
     if self._populate(self.__ui.getMember(DAMAGE_PANEL_PATH)):
         self.__tankIndicator = _TankIndicatorCtrl(self.__ui)
         ctrl = g_sessionProvider.getVehicleStateCtrl()
         ctrl.onVehicleControlling += self.__onVehicleControlling
         ctrl.onVehicleStateUpdated += self.__onVehicleStateUpdated
         g_sessionProvider.addArenaCtrl(self)
         vehicle = ctrl.getControllingVehicle()
         if vehicle:
             self.__vehicleID = vehicle.id
             self._updatePlayerInfo(vehicle.id)
             self.__onVehicleControlling(vehicle)
Ejemplo n.º 10
0
    def __init__(self, appNS):
        g_sessionProvider.registerViewComponents(*_COMPONENTS_TO_CTRLS)
        self.__ns = appNS
        self.__soundManager = None
        self.__arena = BigWorld.player().arena
        self.__plugins = PluginsCollection(self)
        plugins = {}
        if hasFlags():
            plugins['flagNotification'] = FlagNotificationPlugin
        if hasRepairPoints():
            plugins['repairTimer'] = RepairTimerPlugin
        if hasRespawns() and (constants.IS_DEVELOPMENT or not BattleReplay.g_replayCtrl.isPlaying):
            plugins['respawnView'] = RespawnViewPlugin
        if hasResourcePoints():
            plugins['resources'] = ResourcePointsPlugin
        if hasGasAttack():
            plugins['gasAttack'] = GasAttackPlugin
        self.__plugins.addPlugins(plugins)
        self.__denunciator = BattleDenunciator()
        self.__timerSounds = {}
        for timer, sounds in self.VEHICLE_DEATHZONE_TIMER_SOUND.iteritems():
            self.__timerSounds[timer] = {}
            for level, sound in sounds.iteritems():
                self.__timerSounds[timer][level] = SoundGroups.g_instance.getSound2D(sound)

        self.__timerSound = None
        BattleWindow.__init__(self, 'battle.swf')
        self.__isHelpWindowShown = False
        self.__cameraMode = None
        self.component.wg_inputKeyMode = 1
        self.component.position.z = DEPTH_OF_Battle
        self.movie.backgroundAlpha = 0
        self.addFsCallbacks({'battle.leave': self.onExitBattle})
        self.addExternalCallbacks({'battle.showCursor': self.cursorVisibility,
         'battle.tryLeaveRequest': self.tryLeaveRequest,
         'battle.populateFragCorrelationBar': self.populateFragCorrelationBar,
         'Battle.UsersRoster.Appeal': self.onDenunciationReceived,
         'Battle.selectPlayer': self.selectPlayer,
         'battle.helpDialogOpenStatus': self.helpDialogOpenStatus,
         'battle.initLobbyDialog': self._initLobbyDialog,
         'battle.reportBug': self.reportBug})
        self.__dynSquadListener = None
        BigWorld.wg_setRedefineKeysMode(False)
        self.onPostmortemVehicleChanged(BigWorld.player().playerVehicleID)
        return
Ejemplo n.º 11
0
 def __init__(self, parentUI):
     Flash.__init__(self, _MARKERS_MANAGER_SWF)
     self.component.wg_inputKeyMode = 2
     self.component.position.z = DEPTH_OF_VehicleMarker
     self.component.drawWithRestrictedViewPort = False
     self.movie.backgroundAlpha = 0
     self.colorManager = ColorSchemeManager._ColorSchemeManager()
     self.colorManager.populateUI(weakref.proxy(self))
     self.__plugins = PluginsCollection(self)
     plugins = {'equipments': _EquipmentsMarkerPlugin}
     if arena_info.hasFlags():
         plugins['flags'] = _FlagsMarkerPlugin
     if arena_info.hasRepairPoints():
         plugins['repairs'] = _RepairsMarkerPlugin
     if arena_info.hasResourcePoints():
         plugins['resources'] = _ResourceMarkerPlugin
     if arena_info.hasGasAttack():
         plugins['safe_zone'] = _GasAttackSafeZonePlugin
     self.__plugins.addPlugins(plugins)
     self.__ownUI = None
     self.__parentUI = parentUI
     self.__markers = {}
     return
Ejemplo n.º 12
0
 def __init__(self, parentUI):
     Flash.__init__(self, _MARKERS_MANAGER_SWF)
     self.component.wg_inputKeyMode = 2
     self.component.position.z = DEPTH_OF_VehicleMarker
     self.component.drawWithRestrictedViewPort = False
     self.movie.backgroundAlpha = 0
     self.colorManager = ColorSchemeManager._ColorSchemeManager()
     self.colorManager.populateUI(weakref.proxy(self))
     self.__plugins = PluginsCollection(self)
     plugins = {'equipments': _EquipmentsMarkerPlugin}
     if arena_info.hasFlags():
         plugins['flags'] = _FlagsMarkerPlugin
     if arena_info.hasRepairPoints():
         plugins['repairs'] = _RepairsMarkerPlugin
     if arena_info.hasResourcePoints():
         plugins['resources'] = _ResourceMarkerPlugin
     if arena_info.hasGasAttack():
         plugins['safe_zone'] = _GasAttackSafeZonePlugin
     self.__plugins.addPlugins(plugins)
     self.__ownUI = None
     self.__parentUI = parentUI
     self.__markers = {}
     return