diff 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
line wrap: on
line diff
--- a/pytouhou/vm/eclrunner.py
+++ b/pytouhou/vm/eclrunner.py
@@ -804,6 +804,7 @@ class ECLRunner(object):
         if value == 0:
             self._enemy.boss = True
             self._game.boss = self
+            self._game.interface.set_boss_life()
         elif value == -1:
             self._enemy.boss = False
             self._game.boss = None
@@ -856,6 +857,7 @@ class ECLRunner(object):
     @instruction(111)
     def set_life(self, value):
         self._enemy.life = value
+        self._game.interface.set_boss_life()
 
 
     @instruction(112)