예제 #1
0
 def createPlayerInfo(self, entity):
     """
     Creates information about player in specified entity.
     Args:
         entity: prebattle entity
     
     Returns:
         player info
     """
     return PlayerDecorator()
예제 #2
0
 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()
예제 #3
0
    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()
예제 #5
0
 def createPlayerInfo(self, entity):
     info = entity.getPlayerInfo(unitMgrID=entity.getID())
     return PlayerDecorator(info.isCommander(), info.isReady)
예제 #6
0
 def createPlayerInfo(self, functional):
     info = functional.getPlayerInfo(unitIdx=functional.getUnitIdx())
     return PlayerDecorator(info.isCreator(), info.isReady)
예제 #7
0
 def createPlayerInfo(self, entity):
     info = entity.getPlayerInfo()
     return PlayerDecorator(info.isCreator, info.isReady())
예제 #8
0
 def createPlayerInfo(self, functional):
     return PlayerDecorator()
예제 #9
0
 def createPlayerInfo(self, functional):
     info = functional.getPlayerInfo()
     return PlayerDecorator(info.isCreator, info.isReady())
예제 #10
0
 def getPlayerInfo(self):
     factory = self.__factories.get(self.__entity.getCtrlType())
     return factory.createPlayerInfo(
         self.__entity) if factory is not None else PlayerDecorator()