comparison pytouhou/game/sprite.py @ 304:f3099ebf4f61

Update attribute names to reflect the actual interface.
author Thibaut Girka <thib@sitedethib.com>
date Tue, 13 Mar 2012 18:38:14 +0100
parents e04c3e1957c8
children 40d5f3083ebc
comparison
equal deleted inserted replaced
303:647bde10353d 304:f3099ebf4f61
15 15
16 from pytouhou.utils.interpolator import Interpolator 16 from pytouhou.utils.interpolator import Interpolator
17 17
18 18
19 class Sprite(object): 19 class Sprite(object):
20 __slots__ = ('anm', '_removed', '_changed', 'width_override', 'height_override', 20 __slots__ = ('anm', 'removed', 'changed', 'width_override', 'height_override',
21 'angle', 'force_rotation', 'scale_interpolator', 'fade_interpolator', 21 'angle', 'force_rotation', 'scale_interpolator', 'fade_interpolator',
22 'offset_interpolator', 'automatic_orientation', 'blendfunc', 22 'offset_interpolator', 'automatic_orientation', 'blendfunc',
23 'texcoords', 'dest_offset', 'allow_dest_offset', 'texoffsets', 23 'texcoords', 'dest_offset', 'allow_dest_offset', 'texoffsets',
24 'mirrored', 'rescale', 'scale_speed', 'rotations_3d', 24 'mirrored', 'rescale', 'scale_speed', 'rotations_3d',
25 'rotations_speed_3d', 'corner_relative_placement', 'frame', 25 'rotations_speed_3d', 'corner_relative_placement', 'frame',
26 'color', 'alpha', 'visible', '_rendering_data') 26 'color', 'alpha', 'visible', '_rendering_data')
27 def __init__(self, width_override=0, height_override=0): 27 def __init__(self, width_override=0, height_override=0):
28 self.anm = None 28 self.anm = None
29 self._removed = False 29 self.removed = False
30 self._changed = True 30 self.changed = True
31 self.visible = True 31 self.visible = True
32 32
33 self.width_override = width_override 33 self.width_override = width_override
34 self.height_override = height_override 34 self.height_override = height_override
35 self.angle = 0 35 self.angle = 0
80 80
81 def update_orientation(self, angle_base=0., force_rotation=False): 81 def update_orientation(self, angle_base=0., force_rotation=False):
82 if (self.angle != angle_base or self.force_rotation != force_rotation): 82 if (self.angle != angle_base or self.force_rotation != force_rotation):
83 self.angle = angle_base 83 self.angle = angle_base
84 self.force_rotation = force_rotation 84 self.force_rotation = force_rotation
85 self._changed = True 85 self.changed = True
86 86