コード例 #1
0
ファイル: unit.py プロジェクト: onze/goLive
 def __init__(self,player):
    Entity.__init__(self)
    self.owner=player
    self.current_tile=self.owner.home.tile
    #player the unit belongs to. can be none if the unit is neutral
    #data related to moves
    '''list of Tiles to pass by (every tiles). see update_path_following for details.'''
    self.path=[]
    '''list of target tiles (does't change until next target is reached)'''
    self.target_path=[]
    self.x,self.y=self.tile.x,self.tile.y
    self.move_speed=.05
    #when set to true, the unit will mark tiles on its way
    self.is_marking=False
    self.send(self.confirmation_msg)