diff pytouhou/game/face.py @ 384:690b5faaa0e6

Make rendering of multiple-sprites elements work like single-sprites.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 02 Oct 2012 13:27:05 +0200
parents f3099ebf4f61
children c9433188ffdb
line wrap: on
line diff
--- a/pytouhou/game/face.py
+++ b/pytouhou/game/face.py
@@ -18,7 +18,7 @@ from pytouhou.vm.anmrunner import ANMRun
 
 
 class Face(object):
-    __slots__ = ('_anm_wrapper', 'sprite', 'anmrunner', 'side', 'x', 'y')
+    __slots__ = ('_anm_wrapper', 'sprite', 'anmrunner', 'side', 'x', 'y', 'objects')
 
     def __init__(self, anm_wrapper, effect, side):
         self._anm_wrapper = anm_wrapper
@@ -27,6 +27,7 @@ class Face(object):
         self.side = side
         self.load(0)
         self.animate(effect)
+        self.objects = [self]
 
         #FIXME: the same as game.effect.
         self.x = -32