def createPlayerInfo(self, entity): """ Creates information about player in specified entity. Args: entity: prebattle entity Returns: player info """ return PlayerDecorator()
def getPlayerInfo(self): """ Gets information of player (is creator, is ready, etc.) in current active entity. Returns: current player info """ factory = self.__factories.get(self.__entity.getCtrlType()) if factory is not None: return factory.createPlayerInfo(self.__entity) else: return PlayerDecorator()
def getPlayerInfo(self, factories): result = None for ctrlType, item in self.__items.iteritems(): if item and item.hasEntity(): factory = factories.get(ctrlType) if factory: result = factory.createPlayerInfo(item) break if result is None: result = PlayerDecorator() return result
def createPlayerInfo(self, entity): return PlayerDecorator()
def createPlayerInfo(self, entity): info = entity.getPlayerInfo(unitMgrID=entity.getID()) return PlayerDecorator(info.isCommander(), info.isReady)
def createPlayerInfo(self, functional): info = functional.getPlayerInfo(unitIdx=functional.getUnitIdx()) return PlayerDecorator(info.isCreator(), info.isReady)
def createPlayerInfo(self, entity): info = entity.getPlayerInfo() return PlayerDecorator(info.isCreator, info.isReady())
def createPlayerInfo(self, functional): return PlayerDecorator()
def createPlayerInfo(self, functional): info = functional.getPlayerInfo() return PlayerDecorator(info.isCreator, info.isReady())
def getPlayerInfo(self): factory = self.__factories.get(self.__entity.getCtrlType()) return factory.createPlayerInfo( self.__entity) if factory is not None else PlayerDecorator()