comparison pytouhou/game/enemymanager.py @ 34:4d93d45ecb62

Fix animation script flow handling
author Thibaut Girka <thib@sitedethib.com>
date Sun, 14 Aug 2011 13:34:58 +0200
parents 1f21bcc0845b
children f46c18872796
comparison
equal deleted inserted replaced
33:1f21bcc0845b 34:4d93d45ecb62
148 if self.sprite: 148 if self.sprite:
149 changed = self.sprite.update() 149 changed = self.sprite.update()
150 visible = self.is_visible(384, 448) 150 visible = self.is_visible(384, 448)
151 if changed and visible: 151 if changed and visible:
152 self.sprite.update_uvs_vertices() 152 self.sprite.update_uvs_vertices()
153 elif not self.sprite.playing:
154 visible = False
155 self.sprite = None
153 else: 156 else:
154 visible = False 157 visible = False
155 158
156 self.frame += 1 159 self.frame += 1
157 return visible 160 return visible