Mercurial > touhou
comparison pytouhou/game/enemy.py @ 120:4300a832f033
Small refactoring and massive performance improvement
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Thu, 08 Sep 2011 12:46:05 +0200 |
parents | e93a7ed4f203 |
children | d1c82d43bbf3 |
comparison
equal
deleted
inserted
replaced
119:fad7b44cebf2 | 120:4300a832f033 |
---|---|
238 | 238 |
239 if self._sprite: | 239 if self._sprite: |
240 if self._sprite._removed: | 240 if self._sprite._removed: |
241 self._sprite = None | 241 self._sprite = None |
242 else: | 242 else: |
243 self._sprite.update(angle_base=self.angle, | 243 self._sprite.update_orientation(self.angle, |
244 force_rotation=self.automatic_orientation) | 244 self.automatic_orientation) |
245 | 245 |
246 | 246 |
247 if self.bullet_launch_interval != 0: | 247 if self.bullet_launch_interval != 0: |
248 self.bullet_launch_timer += 1 | 248 self.bullet_launch_timer += 1 |
249 if self.bullet_launch_timer == self.bullet_launch_interval: | 249 if self.bullet_launch_timer == self.bullet_launch_interval: |