def __createServices(self): self.__services[TIMER_SERVICE] = TimerService() self.__services['ClientArena'] = ClientArena() self.__services['HUD'] = gui.hud.HUD() self.__services['Input'] = InputController() self.__services['Camera'] = Camera() self.__services['ClientStatsCollector'] = ClientStatsCollector() self.__services['ClientEconomics'] = ClientEconomic() self.__services['Chat'] = Chat() self.__services['BattleHints'] = Messenger(self) self.__services['GamePlayHints'] = GamePlayHints() if consts.IS_DEBUG_IMPORTED: from debug.AvatarDebug import AvatarDebugService self.__services['DebugHUD'] = AvatarDebugService()
def getTimerService(context): """ returns the SMTP srevice instance """ root = context.getPhysicalRoot() try: timer_service = getattr(root, cp_id) except AttributeError: try: control_panel = root.Control_Panel timer_service = getattr(control_panel, cp_id) except AttributeError: timer_service = TimerService(cp_id) else: control_panel._delObject(cp_id) root._setObject(cp_id, timer_service) return timer_service