Пример #1
0
 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
 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))