示例#1
0
文件: ent.py 项目: jcandres/deth
 def update(self):
     Entity.update(self)
     self.life -= 1
     if self.life <= 0:
         self.remove = True
         map.fov_set(self.x, self.y, visible=self.was_visible, blocked=False)
示例#2
0
文件: ent.py 项目: jcandres/deth
 def __init__(self, x, y, life, was_visible=True):
     self.life = life
     self.was_visible = was_visible
     Entity.__init__(self, x, y, name='smoke', char=chr(tcod.CHAR_BLOCK2), blocks=False)
     if not map.is_wall(self.x, self.y):
         map.fov_set(self.x, self.y, visible=False, blocked=map.is_wall(self.x, self.y))