def init(self, clientPrb=None, ctx=None):
     result = super(BattleSessionEntity, self).init(clientPrb=clientPrb, ctx=ctx)
     g_eventDispatcher.loadHangar()
     g_eventDispatcher.loadBattleSessionWindow(self.getEntityType())
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_WINDOW)
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_PAGE)
     g_eventBus.addListener(ChannelCarouselEvent.CAROUSEL_INITED, self.__handleCarouselInited, scope=EVENT_BUS_SCOPE.LOBBY)
     return result
Пример #2
0
 def init(self, clientPrb = None, ctx = None):
     result = super(BattleSessionFunctional, self).init(clientPrb=clientPrb)
     g_eventDispatcher.loadHangar()
     g_eventDispatcher.loadBattleSessionWindow(self.getEntityType())
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_WINDOW)
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_PAGE)
     g_eventBus.addListener(ChannelCarouselEvent.CAROUSEL_INITED, self.__handleCarouselInited, scope=EVENT_BUS_SCOPE.LOBBY)
     g_eventDispatcher.updateUI()
     return result
Пример #3
0
    def init(self, clientPrb=None, ctx=None):
        result = super(TrainingEntity, self).init(clientPrb=clientPrb, ctx=ctx)
        add = g_eventBus.addListener
        for event in self.__loadEvents:
            add(event, self.__handleViewLoad, scope=EVENT_BUS_SCOPE.LOBBY)

        self.__enterTrainingRoom(True)
        result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_WINDOW)
        result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_PAGE)
        return result
Пример #4
0
 def init(self, clientPrb=None, ctx=None):
     result = super(EpicBattleTrainingEntity, self).init(clientPrb=clientPrb)
     g_eventBus.addListener(ViewEventType.LOAD_VIEW, self.__handleViewLoad, scope=EVENT_BUS_SCOPE.LOBBY)
     if clientPrb is None:
         clientPrb = prb_getters.getClientPrebattle()
     if clientPrb is not None:
         clientPrb.onPlayerGroupChanged += self.__prb_onPlayerGroupChanged
     self.__enterTrainingRoom(True)
     g_eventDispatcher.addEpicTrainingToCarousel(False)
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_WINDOW)
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_PAGE)
     return result
    def init(self, clientPrb=None, ctx=None):
        result = super(TrainingEntity, self).init(clientPrb=clientPrb, ctx=ctx)
        add = g_eventBus.addListener
        for event in self.__loadEvents:
            add(event, self.__handleViewLoad, scope=EVENT_BUS_SCOPE.LOBBY)

        self.__enterTrainingRoom(isInitial=ctx.getInitCtx() is None)
        g_eventDispatcher.addTrainingToCarousel(False)
        result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_WINDOW)
        result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_PAGE)
        self.__watcher = TrainingVehiclesWatcher()
        self.__watcher.start()
        return result
Пример #6
0
 def init(self, clientPrb = None, ctx = None):
     result = super(CompanyFunctional, self).init(clientPrb=clientPrb)
     playerInfo = self.getPlayerInfo()
     if self.getTeamState(team=1).isInQueue() and playerInfo.isReady() and playerInfo.roster == PREBATTLE_ROSTER.ASSIGNED_IN_TEAM1:
         g_eventDispatcher.loadBattleQueue()
     else:
         g_eventDispatcher.loadHangar()
     g_eventDispatcher.loadCompany()
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_WINDOW)
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_PAGE)
     g_eventBus.addListener(ChannelCarouselEvent.CAROUSEL_INITED, self.__handleCarouselInited, scope=EVENT_BUS_SCOPE.LOBBY)
     g_eventDispatcher.updateUI()
     g_eventsCache.companies.onCompanyStateChanged += self.onCompanyStateChanged
     return result
Пример #7
0
    def init(self, clientPrb=None, ctx=None):
        result = super(EpicBattleTrainingEntity, self).init(clientPrb=clientPrb)
        add = g_eventBus.addListener
        for event in self.__loadEvents:
            add(event, self.__handleViewLoad, scope=EVENT_BUS_SCOPE.LOBBY)

        if clientPrb is None:
            clientPrb = prb_getters.getClientPrebattle()
        if clientPrb is not None:
            clientPrb.onPlayerGroupChanged += self.__prb_onPlayerGroupChanged
        self.__enterTrainingRoom(True)
        result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_WINDOW)
        result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_PAGE)
        return result
 def init(self, clientPrb=None, ctx=None):
     result = super(TrainingIntroEntity, self).init(clientPrb=clientPrb, ctx=ctx)
     g_eventDispatcher.loadTrainingList()
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_PAGE)
     self.__watcher = TrainingVehiclesWatcher()
     self.__watcher.start()
     return result
Пример #9
0
 def init(self, clientPrb=None, ctx=None):
     result = super(CompanyEntity, self).init(clientPrb=clientPrb, ctx=ctx)
     playerInfo = self.getPlayerInfo()
     if self.getTeamState(team=1).isInQueue() and playerInfo.isReady(
     ) and playerInfo.roster == PREBATTLE_ROSTER.ASSIGNED_IN_TEAM1:
         g_eventDispatcher.loadBattleQueue()
     else:
         g_eventDispatcher.loadHangar()
     g_eventDispatcher.loadCompany()
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_WINDOW)
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_PAGE)
     g_eventBus.addListener(ChannelCarouselEvent.CAROUSEL_INITED,
                            self.__handleCarouselInited,
                            scope=EVENT_BUS_SCOPE.LOBBY)
     self.eventsCache.companies.onCompanyStateChanged += self.__onCompanyStateChanged
     return result
Пример #10
0
 def init(self, clientPrb = None, ctx = None):
     result = super(CompanyIntroFunctional, self).init()
     self._rosterReq.start(self._onPrbRosterReceived)
     g_eventDispatcher.loadCompany()
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_WINDOW)
     g_eventDispatcher.updateUI()
     g_eventsCache.companies.onCompanyStateChanged += self.onCompanyStateChanged
     return result
Пример #11
0
 def init(self, clientPrb=None, ctx=None):
     result = super(CompanyIntroFunctional, self).init()
     self._rosterReq.start(self._onPrbRosterReceived)
     g_eventDispatcher.loadCompany()
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_WINDOW)
     g_eventDispatcher.updateUI()
     g_eventsCache.companies.onCompanyStateChanged += self.onCompanyStateChanged
     return result
Пример #12
0
 def init(self, clientPrb=None, ctx=None):
     result = super(CompanyIntroEntity, self).init(clientPrb=clientPrb,
                                                   ctx=ctx)
     self._rosterReq.start(self._onRosterReceived)
     g_eventDispatcher.loadCompany()
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_WINDOW)
     self.eventsCache.companies.onCompanyStateChanged += self.__onCompanyStateChanged
     return result
Пример #13
0
 def init(self, clientPrb=None, ctx=None):
     result = super(EpicBattleTrainingIntroEntity, self).init()
     g_eventDispatcher.loadEpicTrainingList()
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_PAGE)
     return result
Пример #14
0
 def init(self, clientPrb=None, ctx=None):
     result = super(TrainingIntroFunctional, self).init()
     g_eventDispatcher.loadTrainingList()
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_PAGE)
     g_eventDispatcher.updateUI()
     return result
Пример #15
0
 def init(self, clientPrb = None, ctx = None):
     result = super(TrainingIntroFunctional, self).init()
     g_eventDispatcher.loadTrainingList()
     result = FUNCTIONAL_FLAG.addIfNot(result, FUNCTIONAL_FLAG.LOAD_PAGE)
     g_eventDispatcher.updateUI()
     return result