Mercurial > touhou
comparison pytouhou/vm/eclrunner.py @ 346:862011266f2c
Add a gauge and use it for the enemy life bar.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 05 Jul 2012 00:38:47 +0200 |
parents | 94fdb6c782c1 |
children | b150ed7188a2 |
comparison
equal
deleted
inserted
replaced
345:2c4589370cc6 | 346:862011266f2c |
---|---|
802 # only the last one has her life displayed, | 802 # only the last one has her life displayed, |
803 # but standard enemies are blocked only until any of them is killed. | 803 # but standard enemies are blocked only until any of them is killed. |
804 if value == 0: | 804 if value == 0: |
805 self._enemy.boss = True | 805 self._enemy.boss = True |
806 self._game.boss = self | 806 self._game.boss = self |
807 self._game.interface.set_boss_life() | |
807 elif value == -1: | 808 elif value == -1: |
808 self._enemy.boss = False | 809 self._enemy.boss = False |
809 self._game.boss = None | 810 self._game.boss = None |
810 else: | 811 else: |
811 raise Exception #TODO | 812 raise Exception #TODO |
854 | 855 |
855 | 856 |
856 @instruction(111) | 857 @instruction(111) |
857 def set_life(self, value): | 858 def set_life(self, value): |
858 self._enemy.life = value | 859 self._enemy.life = value |
860 self._game.interface.set_boss_life() | |
859 | 861 |
860 | 862 |
861 @instruction(112) | 863 @instruction(112) |
862 def set_ellapsed_time(self, value): | 864 def set_ellapsed_time(self, value): |
863 """Sets the enemy's frame counter. | 865 """Sets the enemy's frame counter. |