Mercurial > touhou
diff pytouhou/game/background.py @ 26:f17122405121
Basic sprite animation support
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Fri, 12 Aug 2011 19:38:27 +0200 |
parents | bf225780973f |
children | afa91be769ae |
line wrap: on
line diff
--- a/pytouhou/game/background.py +++ b/pytouhou/game/background.py @@ -15,6 +15,10 @@ class Background(object): self.object_instances = [] self.objects_by_texture = {} + self.position_interpolator = Interpolator((0, 0, 0)) + self.fog_interpolator = Interpolator((0, 0, 0, 0, 0)) + self.position2_interpolator = Interpolator((0, 0, 0)) + self.build_objects() self.build_object_instances() @@ -69,10 +73,6 @@ class Background(object): anm = self.anm_wrapper.anm_files[0] self.objects_by_texture = {(anm.first_name, anm.secondary_name): (nb_vertices, vertices, uvs)} - self.position_interpolator = Interpolator((0, 0, 0)) - self.fog_interpolator = Interpolator((0, 0, 0, 0, 0)) - self.position2_interpolator = Interpolator((0, 0, 0)) - for frame_num, message_type, args in self.stage.script: if frame_num == frame: if message_type == 0: