diff 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
line wrap: on
line diff
--- a/pytouhou/game/enemymanager.py
+++ b/pytouhou/game/enemymanager.py
@@ -150,6 +150,9 @@ class Enemy(object):
             visible = self.is_visible(384, 448)
             if changed and visible:
                 self.sprite.update_uvs_vertices()
+            elif not self.sprite.playing:
+                visible = False
+                self.sprite = None
         else:
             visible = False