Mercurial > touhou
diff pytouhou/game/sprite.py @ 29:afa91be769ae
Don't lose time updating off-screen enemies' sprites
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Fri, 12 Aug 2011 22:03:34 +0200 |
parents | f405b947624d |
children | e3ba2fa966f6 |
line wrap: on
line diff
--- a/pytouhou/game/sprite.py +++ b/pytouhou/game/sprite.py @@ -70,7 +70,7 @@ class Sprite(object): - def update(self, override_width=0, override_height=0): + def update(self): properties = {} for time, instr_type, data in self.anm.scripts[self.script_index]: if time == self.frame: @@ -106,10 +106,8 @@ class Sprite(object): del properties[23] if properties: print('Leftover properties: %r' % properties) #TODO - self.update_uvs_vertices(override_width, override_height) return True if self.rotations_speed_3d != (0., 0., 0.): - self.update_uvs_vertices(override_width, override_height) return True return False