comparison 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
comparison
equal deleted inserted replaced
383:0537af9125a7 384:690b5faaa0e6
16 from pytouhou.game.sprite import Sprite 16 from pytouhou.game.sprite import Sprite
17 from pytouhou.vm.anmrunner import ANMRunner 17 from pytouhou.vm.anmrunner import ANMRunner
18 18
19 19
20 class Face(object): 20 class Face(object):
21 __slots__ = ('_anm_wrapper', 'sprite', 'anmrunner', 'side', 'x', 'y') 21 __slots__ = ('_anm_wrapper', 'sprite', 'anmrunner', 'side', 'x', 'y', 'objects')
22 22
23 def __init__(self, anm_wrapper, effect, side): 23 def __init__(self, anm_wrapper, effect, side):
24 self._anm_wrapper = anm_wrapper 24 self._anm_wrapper = anm_wrapper
25 self.sprite = Sprite() 25 self.sprite = Sprite()
26 self.anmrunner = ANMRunner(anm_wrapper, side * 2, self.sprite) 26 self.anmrunner = ANMRunner(anm_wrapper, side * 2, self.sprite)
27 self.side = side 27 self.side = side
28 self.load(0) 28 self.load(0)
29 self.animate(effect) 29 self.animate(effect)
30 self.objects = [self]
30 31
31 #FIXME: the same as game.effect. 32 #FIXME: the same as game.effect.
32 self.x = -32 33 self.x = -32
33 self.y = -16 34 self.y = -16
34 self.sprite.allow_dest_offset = True 35 self.sprite.allow_dest_offset = True