Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/MAFH2/BattleEngine.py
diff options
context:
space:
mode:
authorKevin Hockey <Blitzkev@gmail.com>2010-08-04 20:29:58 (GMT)
committer Kevin Hockey <Blitzkev@gmail.com>2010-08-04 20:29:58 (GMT)
commitf9e189279b3b38d2ec59c5728ecbbf27c44d66f6 (patch)
tree481fcfe1aeab5f0edad8e536cde7ba6867e77a92 /MAFH2/BattleEngine.py
parent8e9e99d755802518394bff3ab91ff0341b57c9ec (diff)
fix for fps and hp bars
Diffstat (limited to 'MAFH2/BattleEngine.py')
-rw-r--r--MAFH2/BattleEngine.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/MAFH2/BattleEngine.py b/MAFH2/BattleEngine.py
index b9e2b1a..b3d38b0 100644
--- a/MAFH2/BattleEngine.py
+++ b/MAFH2/BattleEngine.py
@@ -51,8 +51,9 @@ class BattleEngine(GameEngineElement):
self.__drawableObjects[i] = DrawableObject([pygame.image.load( HUD_PATH + i + ".gif" )], '')
self.game_engine.get_scene().addObject(self.__drawableObjects[i])
- self.__drawableObjects['hp'] = DrawableObject(Spritesheet( HUD_PATH + "hp.gif" ).img_extract(11,1,100,100), '')
+ self.__drawableObjects['hp'] = DrawableObject(Spritesheet( HUD_PATH + "hp.gif" ).img_extract(11,1,100,100,[255,0,255]), '')
self.__drawableObjects['bt'] = DrawableObject(Spritesheet( HUD_PATH + "bt.gif" ).img_extract(1,11,100,25), '', True)
+ self.__drawableObjects['hp'].setColorKey((255,0,255))
self.game_engine.get_scene().addObject(self.__drawableObjects['hp'])
self.game_engine.get_scene().addObject(self.__drawableObjects['bt'])
@@ -352,8 +353,8 @@ class BattleEngine(GameEngineElement):
#self terminate
#print 'end battle called'
self.remove_from_engine()
- for object in self.__drawableObjects:
- self.game_engine.get_scene().removeObject(object)
+ for key in self.__drawableObjects:
+ self.game_engine.get_scene().removeObject(self.__drawableObjects[key])
self.game_engine.get_object('battlemenu').remove_from_engine()
self.game_engine.remove_object('battle')
@@ -401,6 +402,6 @@ class BattleEngine(GameEngineElement):
# Player Health
health = 10 - profile.hero.healthLevel()
- self.__drawableObjects['hp'].goToAnim(health)
+ self.__drawableObjects['hp'].goToFrame(health)
self.__drawableObjects['hp'].setPosition(25,25)