Mercurial > touhou
comparison pytouhou/game/enemy.pyx @ 545:bcff39c920ab
Set boss mode directly from the enemy.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 15 May 2014 20:14:54 +0200 |
parents | 53fa73932e9a |
children | e35bef07290d |
comparison
equal
deleted
inserted
replaced
544:b895ed2de71f | 545:bcff39c920ab |
---|---|
307 self.speed_interpolator = Interpolator((self.speed,), frame, | 307 self.speed_interpolator = Interpolator((self.speed,), frame, |
308 (0.,), frame + duration - 1, | 308 (0.,), frame + duration - 1, |
309 formula) | 309 formula) |
310 | 310 |
311 | 311 |
312 cpdef set_boss(self, bint enable): | |
313 if enable: | |
314 self.boss = True | |
315 self._game.boss = self | |
316 self._game.interface.set_boss_life() | |
317 else: | |
318 self.boss = False | |
319 self._game.boss = None | |
320 | |
321 | |
312 cdef bint is_visible(self, long screen_width, long screen_height): | 322 cdef bint is_visible(self, long screen_width, long screen_height): |
313 if self.sprite is not None: | 323 if self.sprite is not None: |
314 if self.sprite.corner_relative_placement: | 324 if self.sprite.corner_relative_placement: |
315 raise Exception #TODO | 325 raise Exception #TODO |
316 tw, th = self.sprite._texcoords[2], self.sprite._texcoords[3] | 326 tw, th = self.sprite._texcoords[2], self.sprite._texcoords[3] |