def start(self, setup): self.__isReplayPlaying = setup.isReplayPlaying self.__arenaVisitor = arena_visitor.createByAvatar(avatar=setup.avatar) setup.sessionProvider = weakref.proxy(self) self.__arenaDP = ArenaDataProvider(setup) self.__ctx.start(self.__arenaDP) self.__battleCache.load() self.__arenaListeners = ListenersCollection() self.__arenaListeners.start(setup) self.__viewComponentsBridge = createComponentsBridge() setup.sessionProvider = weakref.proxy(self) self.__sharedRepo = controllers.createShared(setup) self.__dynamicRepo = controllers.createDynamic(setup) self.__requestsCtrl = AvatarRequestsController() self.__invitations = invitations.createInvitationsHandler(setup) setup.clear() g_playerEvents.onBattleResultsReceived += self.__pe_onBattleResultsReceived
def start(self, setup): """ Battle session is started. :param setup: instance of BattleSessionSetup. :return: """ raise isinstance(setup, controllers.BattleSessionSetup) or AssertionError self.__isReplayPlaying = setup.isReplayPlaying self.__arenaVisitor = arena_visitor.createByAvatar(avatar=setup.avatar) setup.sessionProvider = weakref.proxy(self) self.__arenaDP = ArenaDataProvider(setup) self.__ctx.start(self.__arenaDP) self.__arenaListeners = ListenersCollection() self.__arenaListeners.start(setup) self.__viewComponentsBridge = createComponentsBridge() setup.sessionProvider = weakref.proxy(self) self.__sharedRepo = controllers.createShared(setup) self.__dynamicRepo = controllers.createDynamic(setup) self.__requestsCtrl = AvatarRequestsController() self.__invitations = invitations.createInvitationsHandler(setup) setup.clear() g_playerEvents.onBattleResultsReceived += self.__pe_onBattleResultsReceived
def start(self, setup): """ Battle session is started. :param setup: instance of BattleSessionSetup. :return: """ raise isinstance(setup, controllers.BattleSessionSetup) or AssertionError self.__isReplayPlaying = setup.isReplayPlaying self.__arenaVisitor = arena_visitor.createByAvatar(avatar=setup.avatar) setup.sessionProvider = weakref.proxy(self) self.__arenaDP = ArenaDataProvider(setup) self.__ctx.start(self.__arenaDP) self.__arenaListeners = ListenersCollection() self.__arenaListeners.start(setup) self.__viewComponentsBridge = createComponentsBridge() setup.sessionProvider = weakref.proxy(self) self.__sharedRepo = controllers.createShared(setup) self.__dynamicRepo = controllers.createDynamic(setup) self.__requestsCtrl = AvatarRequestsController() self.__invitations = invitations.createInvitationsHandler(setup) setup.clear() g_playerEvents.onBattleResultsReceived += self.__pe_onBattleResultsReceived