Mercurial > touhou
comparison pytouhou/vm/eclrunner.py @ 242:1d3c8c7473a2
Implement auxiliary animations of enemies like magic circles, and interruptions from ecl.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Mon, 02 Jan 2012 15:46:29 +0100 |
parents | 9bb26dbb8438 |
children | 2b7f69ad9ccd |
comparison
equal
deleted
inserted
replaced
241:dd2bd7283bec | 242:1d3c8c7473a2 |
---|---|
742 if enemy.touchable and not enemy.boss: | 742 if enemy.touchable and not enemy.boss: |
743 enemy.life = 0 | 743 enemy.life = 0 |
744 | 744 |
745 | 745 |
746 @instruction(97) | 746 @instruction(97) |
747 def set_anim(self, sprite_index): | 747 def set_anim(self, script): |
748 self._enemy.set_anim(sprite_index) | 748 self._enemy.set_anim(script) |
749 | 749 |
750 | 750 |
751 @instruction(98) | 751 @instruction(98) |
752 def set_multiple_anims(self, default, end_left, end_right, left, right): | 752 def set_multiple_anims(self, default, end_left, end_right, left, right): |
753 self._enemy.movement_dependant_sprites = end_left, end_right, left, right | 753 self._enemy.movement_dependant_sprites = end_left, end_right, left, right |
754 self._enemy.set_anim(default) | 754 self._enemy.set_anim(default) |
755 | |
756 | |
757 @instruction(99) | |
758 def set_aux_anm(self, number, script): | |
759 self._enemy.set_aux_anm(number, script) | |
755 | 760 |
756 | 761 |
757 @instruction(100) | 762 @instruction(100) |
758 def set_death_anim(self, sprite_index): | 763 def set_death_anim(self, sprite_index): |
759 self._enemy.death_anim = sprite_index | 764 self._enemy.death_anim = sprite_index |
929 @instruction(126) | 934 @instruction(126) |
930 def set_remaining_lives(self, lives): | 935 def set_remaining_lives(self, lives): |
931 self._enemy.remaining_lives = lives | 936 self._enemy.remaining_lives = lives |
932 | 937 |
933 | 938 |
939 @instruction(128) | |
940 def interrupt(self, event): | |
941 self._enemy._anmrunner.interrupt(event) | |
942 | |
943 | |
944 @instruction(129) | |
945 def interrupt_aux(self, number, event): | |
946 self._enemy.aux_anm[number]._anmrunner.interrupt(event) | |
947 | |
948 | |
934 @instruction(132) | 949 @instruction(132) |
935 def set_visible(self, value): | 950 def set_visible(self, value): |
936 self._enemy._visible = bool(value) | 951 self._enemy._visible = bool(value) |
937 if self._enemy._sprite: | 952 if self._enemy._sprite: |
938 self._enemy._sprite._removed = bool(value) | 953 self._enemy._sprite._removed = bool(value) |