diff pytouhou/game/enemymanager.py @ 90:630e9045e851

Minor refactoring
author Thibaut Girka <thib@sitedethib.com>
date Sun, 04 Sep 2011 10:12:15 +0200
parents 3804f07d3b0e
children d167280a82fc
line wrap: on
line diff
--- a/pytouhou/game/enemymanager.py
+++ b/pytouhou/game/enemymanager.py
@@ -180,6 +180,8 @@ class Enemy(object):
         if not self._sprite:
             return
 
+        self._sprite.update_vertices_uvs_colors()
+
         key = self._sprite.anm.first_name, self._sprite.anm.secondary_name
         key = (key, self._sprite.blendfunc)
         if not key in objects_by_texture:
@@ -244,10 +246,8 @@ class Enemy(object):
             if self._sprite._removed:
                 self._sprite = None
             else:
-                self._sprite.update()
-                if self._sprite._changed or self.automatic_orientation:
-                    angle_base = self.angle if self.automatic_orientation else 0.
-                    self._sprite.update_vertices_uvs_colors(angle_base=angle_base)
+                self._sprite.update(angle_base=self.angle,
+                                    force_rotation=self.automatic_orientation)
 
 
         if self.bullet_launch_interval != 0: