Exemplo n.º 1
0
 def init(self):
     self.__channelsCtrl = channels.LobbyControllers()
     self.__channelsCtrl.init()
     self.__carouselHandler = ChannelsCarouselHandler(self)
     self.__carouselHandler.init()
     events = g_messengerEvents.channels
     events.onMessageReceived += self.__me_onMessageReceived
     events.onHistoryReceived += self.__me_onHistoryReceived
     add = g_eventBus.addListener
     add(MessengerEvent.LAZY_CHANNEL_CTRL_INITED,
         self.__handleLazyChannelCtlInited,
         scope=EVENT_BUS_SCOPE.LOBBY)
     add(MessengerEvent.LAZY_CHANNEL_CTRL_DESTROYED,
         self.__handleLazyChannelCtlDestroyed,
         scope=EVENT_BUS_SCOPE.LOBBY)
     add(MessengerEvent.LOBBY_CHANNEL_CTRL_INITED,
         self.__handleLobbyChannelCtlInited,
         scope=EVENT_BUS_SCOPE.LOBBY)
     add(MessengerEvent.LOBBY_CHANNEL_CTRL_DESTROYED,
         self.__handleLobbyChannelCtlDestroyed,
         scope=EVENT_BUS_SCOPE.LOBBY)
     add(MessengerEvent.PRB_CHANNEL_CTRL_INITED,
         self.__handlePrbChannelControllerInited,
         scope=EVENT_BUS_SCOPE.LOBBY)
     add(ChannelManagementEvent.REQUEST_TO_ACTIVATE,
         self.__handleRqActivateChannel,
         scope=EVENT_BUS_SCOPE.LOBBY)
     add(ChannelManagementEvent.REQUEST_TO_DEACTIVATE,
         self.__handleRqDeactivateChannel,
         scope=EVENT_BUS_SCOPE.LOBBY)
     add(ChannelManagementEvent.REQUEST_TO_EXIT,
         self.__handleRqExitFromChannel,
         scope=EVENT_BUS_SCOPE.LOBBY)
Exemplo n.º 2
0
 def init(self):
     self.__channelsCtrl = channels.LobbyControllers()
     self.__channelsCtrl.init()
     self.__carouselHandler = ChannelsCarouselHandler(self)
     self.__carouselHandler.init()
     g_messengerEvents.channels.onMessageReceived += self.__me_onMessageReceived
     add = g_eventBus.addListener
     add(MessengerEvent.LAZY_CHANNEL_CTRL_INITED,
         self.__handleLazyChannelCtlInited,
         scope=EVENT_BUS_SCOPE.LOBBY)
     add(MessengerEvent.LAZY_CHANNEL_CTRL_DESTROYED,
         self.__handleLazyChannelCtlDestroyed,
         scope=EVENT_BUS_SCOPE.LOBBY)
     add(MessengerEvent.LOBBY_CHANNEL_CTRL_INITED,
         self.__handleLobbyChannelCtlInited,
         scope=EVENT_BUS_SCOPE.LOBBY)
     add(MessengerEvent.LOBBY_CHANNEL_CTRL_DESTROYED,
         self.__handleLobbyChannelCtlDestroyed,
         scope=EVENT_BUS_SCOPE.LOBBY)