comparison pytouhou/vm/eclrunner.py @ 441:e8dc95a2a287

Make pytouhou.game.enemy an extension type.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 10 Aug 2013 19:59:17 +0200
parents c9433188ffdb
children b0abb05811f7
comparison
equal deleted inserted replaced
440:b9d2db93972f 441:e8dc95a2a287
813 raise Exception #TODO 813 raise Exception #TODO
814 814
815 815
816 @instruction(103) 816 @instruction(103)
817 def set_hitbox(self, width, height, depth): 817 def set_hitbox(self, width, height, depth):
818 self._enemy.hitbox = (width, height) 818 self._enemy.set_hitbox(width, height)
819 self._enemy.hitbox_half_size = (width / 2., height / 2.)
820 819
821 820
822 @instruction(104) 821 @instruction(104)
823 def set_collidable(self, collidable): 822 def set_collidable(self, collidable):
824 """Defines whether the enemy is “collidable”. 823 """Defines whether the enemy is “collidable”.