Пример #1
0
 def start(self):
     import BattleReplay
     replayCtrl = BattleReplay.g_replayCtrl
     if isEventBattle():
         replayCtrl.enableAutoRecordingBattles(0)
     isReplayRecording = replayCtrl.isRecording
     isReplayPlaying = replayCtrl.isPlaying
     self.__arenaDP = ArenaDataProvider()
     self.__ctx.start(self.__arenaDP)
     self.__ammoCtrl = consumables.createAmmoCtrl(isReplayPlaying, isReplayRecording)
     self.__equipmentsCtrl = consumables.createEquipmentCtrl(isReplayPlaying)
     self.__optDevicesCtrl = consumables.createOptDevicesCtrl()
     self.__vehicleStateCtrl = vehicle_state_ctrl.createCtrl(isReplayRecording)
     self.__chatCommands = ChatCommandsController()
     self.__arenaLoadCtrl = ArenaLoadController()
     self.__drrScaleCtrl = DRRScaleController()
     self.__respawnsCtrl = RespawnsController()
     self.__notificationsCtrl = NotificationsController()
     self.__repairCtrl = RepairController()
     self.__arenaListeners = ListenersCollection()
     self.__arenaListeners.addController(weakref.proxy(self.__ctx), self.__arenaLoadCtrl)
     self.__arenaListeners.addController(weakref.proxy(self.__ctx), self.__respawnsCtrl)
     self.__arenaListeners.start(arenaDP=self.__arenaDP)
     self.__feedback = createFeedbackAdaptor(isReplayPlaying)
     self.__feedback.start(self.__arenaDP)
     self.__requestsCtrl = AvatarRequestsController()
 def start(self, startCtx=None):
     """
     Battle session is started.
     :param startCtx: instance of BattleSessionProviderStartCtx.
     :return:
     """
     isReplayRecording = startCtx.replayCtrl.isRecording
     isReplayPlaying = startCtx.replayCtrl.isPlaying
     self.__arenaDP = ArenaDataProvider(avatar=startCtx.avatar)
     self.__ctx.start(self.__arenaDP)
     self.__ammoCtrl = consumables.createAmmoCtrl(isReplayPlaying,
                                                  isReplayRecording)
     self.__equipmentsCtrl = consumables.createEquipmentCtrl(
         isReplayPlaying)
     self.__optDevicesCtrl = consumables.createOptDevicesCtrl()
     self.__vehicleStateCtrl = vehicle_state_ctrl.createCtrl(
         isReplayRecording)
     self.__arenaLoadCtrl = ArenaLoadController()
     self.__arenaTeamsBasesCtrl = createTeamsBasesCtrl(isReplayPlaying)
     self.__periodCtrl = createPeriodCtrl(isReplayPlaying,
                                          isReplayRecording)
     self.__respawnsCtrl = RespawnsController(startCtx)
     self.__repairCtrl = RepairController()
     self.__dynSquadFunctional = DynSquadFunctional(isReplayPlaying)
     self.__notificationsCtrl = NotificationsController(self.__arenaDP)
     self.__gasAttackCtrl = GasAttackController(startCtx)
     ctx = weakref.proxy(self.__ctx)
     self.__arenaListeners = ListenersCollection()
     self.__arenaListeners.addController(ctx, self.__arenaLoadCtrl)
     self.__arenaListeners.addController(ctx, self.__arenaTeamsBasesCtrl)
     self.__arenaListeners.addController(ctx, self.__periodCtrl)
     self.__arenaListeners.addController(ctx, self.__respawnsCtrl)
     self.__arenaListeners.addController(ctx, self.__dynSquadFunctional)
     self.__arenaListeners.start(startCtx.avatar.arena,
                                 arenaDP=self.__arenaDP)
     self.__feedback = createFeedbackAdaptor(isReplayPlaying)
     self.__feedback.start(self.__arenaDP)
     self.__messagesCtrl = createBattleMessagesCtrl(isReplayPlaying)
     self.__messagesCtrl.start(ctx)
     self.__drrScaleCtrl = DRRScaleController()
     self.__drrScaleCtrl.start(self.__messagesCtrl)
     self.__hitDirectionCtrl = HitDirectionController()
     self.__hitDirectionCtrl.start()
     g_playerEvents.onBattleResultsReceived += self.__pe_onBattleResultsReceived
     self.__chatCommands = ChatCommandsController()
     self.__chatCommands.start(self.__arenaDP, self.__feedback)
     self.__requestsCtrl = AvatarRequestsController()
     self.__avatarStatsCtrl = AvatarStatsController()
     self.__debugCtrl = DebugController()
     self.__debugCtrl.start()
     self.__viewComponentsBridge = createComponentsBridge()
     self.__viewComponentsBridge.registerControllers(
         (BATTLE_CTRL.PERIOD, self.__periodCtrl),
         (BATTLE_CTRL.TEAM_BASES, self.__arenaTeamsBasesCtrl),
         (BATTLE_CTRL.DEBUG, self.__debugCtrl),
         (BATTLE_CTRL.HIT_DIRECTION, self.__hitDirectionCtrl))
Пример #3
0
 def start(self):
     import BattleReplay
     replayCtrl = BattleReplay.g_replayCtrl
     isReplayRecording = replayCtrl.isRecording
     isReplayPlaying = replayCtrl.isPlaying
     self.__arenaDP = ArenaDataProvider()
     self.__ctx.start(self.__arenaDP)
     self.__ammoCtrl = consumables.createAmmoCtrl(isReplayPlaying, isReplayRecording)
     self.__equipmentsCtrl = consumables.createEquipmentCtrl(isReplayPlaying)
     self.__optDevicesCtrl = consumables.createOptDevicesCtrl()
     self.__chatCommands = ChatCommandsController()
     self.__arenaLoadCtrl = ArenaLoadController()
     self.__drrScaleCtrl = DRRScaleController()
     self.__arenaListeners = ListenersCollection()
     self.__arenaListeners.addController(weakref.proxy(self.__ctx), self.__arenaLoadCtrl)
     self.__arenaListeners.start(arenaDP=self.__arenaDP)
 def start(self, startCtx = None):
     """
     Battle session is started.
     :param startCtx: instance of BattleSessionProviderStartCtx.
     :return:
     """
     isReplayRecording = startCtx.replayCtrl.isRecording
     isReplayPlaying = startCtx.replayCtrl.isPlaying
     self.__arenaDP = ArenaDataProvider(avatar=startCtx.avatar)
     self.__ctx.start(self.__arenaDP)
     self.__ammoCtrl = consumables.createAmmoCtrl(isReplayPlaying, isReplayRecording)
     self.__equipmentsCtrl = consumables.createEquipmentCtrl(isReplayPlaying)
     self.__optDevicesCtrl = consumables.createOptDevicesCtrl()
     self.__vehicleStateCtrl = vehicle_state_ctrl.createCtrl(isReplayRecording)
     self.__arenaLoadCtrl = ArenaLoadController()
     self.__arenaTeamsBasesCtrl = createTeamsBasesCtrl(isReplayPlaying)
     self.__periodCtrl = createPeriodCtrl(isReplayPlaying, isReplayRecording)
     self.__respawnsCtrl = RespawnsController(startCtx)
     self.__repairCtrl = RepairController()
     self.__dynSquadFunctional = DynSquadFunctional(isReplayPlaying)
     self.__notificationsCtrl = NotificationsController(self.__arenaDP)
     self.__gasAttackCtrl = GasAttackController(startCtx)
     ctx = weakref.proxy(self.__ctx)
     self.__arenaListeners = ListenersCollection()
     self.__arenaListeners.addController(ctx, self.__arenaLoadCtrl)
     self.__arenaListeners.addController(ctx, self.__arenaTeamsBasesCtrl)
     self.__arenaListeners.addController(ctx, self.__periodCtrl)
     self.__arenaListeners.addController(ctx, self.__respawnsCtrl)
     self.__arenaListeners.addController(ctx, self.__dynSquadFunctional)
     self.__arenaListeners.start(startCtx.avatar.arena, arenaDP=self.__arenaDP)
     self.__feedback = createFeedbackAdaptor(isReplayPlaying)
     self.__feedback.start(self.__arenaDP)
     self.__messagesCtrl = createBattleMessagesCtrl(isReplayPlaying)
     self.__messagesCtrl.start(ctx)
     self.__drrScaleCtrl = DRRScaleController()
     self.__drrScaleCtrl.start(self.__messagesCtrl)
     self.__hitDirectionCtrl = HitDirectionController()
     self.__hitDirectionCtrl.start()
     g_playerEvents.onBattleResultsReceived += self.__pe_onBattleResultsReceived
     self.__chatCommands = ChatCommandsController()
     self.__chatCommands.start(self.__arenaDP, self.__feedback)
     self.__requestsCtrl = AvatarRequestsController()
     self.__avatarStatsCtrl = AvatarStatsController()
     self.__debugCtrl = DebugController()
     self.__debugCtrl.start()
     self.__viewComponentsBridge = createComponentsBridge()
     self.__viewComponentsBridge.registerControllers((BATTLE_CTRL.PERIOD, self.__periodCtrl), (BATTLE_CTRL.TEAM_BASES, self.__arenaTeamsBasesCtrl), (BATTLE_CTRL.DEBUG, self.__debugCtrl), (BATTLE_CTRL.HIT_DIRECTION, self.__hitDirectionCtrl))
Пример #5
0
 def start(self, avatar=None):
     import BattleReplay
     replayCtrl = BattleReplay.g_replayCtrl
     isReplayRecording = replayCtrl.isRecording
     isReplayPlaying = replayCtrl.isPlaying
     self.__arenaDP = ArenaDataProvider(avatar=avatar)
     self.__ctx.start(self.__arenaDP)
     self.__ammoCtrl = consumables.createAmmoCtrl(isReplayPlaying,
                                                  isReplayRecording)
     self.__equipmentsCtrl = consumables.createEquipmentCtrl(
         isReplayPlaying)
     self.__optDevicesCtrl = consumables.createOptDevicesCtrl()
     self.__vehicleStateCtrl = vehicle_state_ctrl.createCtrl(
         isReplayRecording)
     isMultiTeam = self.__arenaDP.isMultipleTeams()
     self.__arenaLoadCtrl = ArenaLoadController(isMultiTeam)
     self.__arenaTeamsBasesCtrl = createTeamsBasesCtrl(isReplayPlaying)
     self.__periodCtrl = createPeriodCtrl(isReplayPlaying,
                                          isReplayRecording)
     self.__drrScaleCtrl = DRRScaleController()
     self.__respawnsCtrl = RespawnsController()
     self.__repairCtrl = RepairController()
     self.__dynSquadFunctional = DynSquadFunctional()
     self.__notificationsCtrl = NotificationsController(self.__arenaDP)
     ctx = weakref.proxy(self.__ctx)
     self.__arenaListeners = ListenersCollection()
     self.__arenaListeners.addController(ctx, self.__arenaLoadCtrl)
     self.__arenaListeners.addController(ctx, self.__arenaTeamsBasesCtrl)
     self.__arenaListeners.addController(ctx, self.__periodCtrl)
     self.__arenaListeners.addController(ctx, self.__respawnsCtrl)
     self.__arenaListeners.start(getClientArena(avatar=avatar),
                                 arenaDP=self.__arenaDP)
     self.__feedback = createFeedbackAdaptor(isReplayPlaying)
     self.__feedback.start(self.__arenaDP)
     self.__messagesCtrl = createBattleMessagesCtrl(isReplayPlaying)
     self.__messagesCtrl.start(ctx)
     self.__hitDirectionCtrl = HitDirectionController()
     self.__hitDirectionCtrl.start()
     g_playerEvents.onBattleResultsReceived += self.__pe_onBattleResultsReceived
     self.__chatCommands = ChatCommandsController()
     self.__chatCommands.start(self.__arenaDP, self.__feedback)
     self.__requestsCtrl = AvatarRequestsController()
     self.__avatarStatsCtrl = AvatarStatsController()
Пример #6
0
    def start(self, avatar=None):
        import BattleReplay

        replayCtrl = BattleReplay.g_replayCtrl
        isReplayRecording = replayCtrl.isRecording
        isReplayPlaying = replayCtrl.isPlaying
        self.__arenaDP = ArenaDataProvider(avatar=avatar)
        self.__ctx.start(self.__arenaDP)
        self.__ammoCtrl = consumables.createAmmoCtrl(isReplayPlaying, isReplayRecording)
        self.__equipmentsCtrl = consumables.createEquipmentCtrl(isReplayPlaying)
        self.__optDevicesCtrl = consumables.createOptDevicesCtrl()
        self.__vehicleStateCtrl = vehicle_state_ctrl.createCtrl(isReplayRecording)
        isMultiTeam = self.__arenaDP.isMultipleTeams()
        self.__arenaLoadCtrl = ArenaLoadController(isMultiTeam)
        self.__arenaTeamsBasesCtrl = createTeamsBasesCtrl(isReplayPlaying)
        self.__periodCtrl = createPeriodCtrl(isReplayPlaying, isReplayRecording)
        self.__drrScaleCtrl = DRRScaleController()
        self.__respawnsCtrl = RespawnsController()
        self.__repairCtrl = RepairController()
        self.__dynSquadFunctional = DynSquadFunctional()
        self.__notificationsCtrl = NotificationsController(self.__arenaDP)
        ctx = weakref.proxy(self.__ctx)
        self.__arenaListeners = ListenersCollection()
        self.__arenaListeners.addController(ctx, self.__arenaLoadCtrl)
        self.__arenaListeners.addController(ctx, self.__arenaTeamsBasesCtrl)
        self.__arenaListeners.addController(ctx, self.__periodCtrl)
        self.__arenaListeners.addController(ctx, self.__respawnsCtrl)
        self.__arenaListeners.start(getClientArena(avatar=avatar), arenaDP=self.__arenaDP)
        self.__feedback = createFeedbackAdaptor(isReplayPlaying)
        self.__feedback.start(self.__arenaDP)
        self.__messagesCtrl = createBattleMessagesCtrl(isReplayPlaying)
        self.__messagesCtrl.start(ctx)
        self.__hitDirectionCtrl = HitDirectionController()
        self.__hitDirectionCtrl.start()
        g_playerEvents.onBattleResultsReceived += self.__pe_onBattleResultsReceived
        self.__chatCommands = ChatCommandsController()
        self.__chatCommands.start(self.__arenaDP, self.__feedback)
        self.__requestsCtrl = AvatarRequestsController()
        self.__avatarStatsCtrl = AvatarStatsController()