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-05 15:11:09 (GMT)
committer Kevin Hockey <Blitzkev@gmail.com>2010-08-05 15:11:09 (GMT)
commited258092599598639eb8c75b73529a29b13a70a6 (patch)
treedadcf8e7ff4bfca759332aff437fb1220db8af0e /MAFH2/BattleEngine.py
parentd64ea3c18599d3df0065b6466c90bbdf0411bd56 (diff)
added battle timer functionality
Diffstat (limited to 'MAFH2/BattleEngine.py')
-rw-r--r--MAFH2/BattleEngine.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/MAFH2/BattleEngine.py b/MAFH2/BattleEngine.py
index e9ae66e..bce9512 100644
--- a/MAFH2/BattleEngine.py
+++ b/MAFH2/BattleEngine.py
@@ -54,8 +54,9 @@ class BattleEngine(GameEngineElement):
self.game_engine.get_scene().addObject(self.__drawableObjects[i])
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['bt'] = DrawableObject(Spritesheet( HUD_PATH + "bt.gif" ).img_extract(1,11,100,25, [255,0,255]), '', True)
self.__drawableObjects['hp'].setColorKey((255,0,255))
+ self.__drawableObjects['bt'].setColorKey((255,0,255))
self.game_engine.get_scene().addObject(self.__drawableObjects['hp'])
self.game_engine.get_scene().addObject(self.__drawableObjects['bt'])
@@ -435,7 +436,11 @@ class BattleEngine(GameEngineElement):
#Battle Timer
if(self.battleTimer > 0):
+ self.__drawableObjects['bt'].makeTransparent(False)
+ self.__drawableObjects['bt'].setPosition(25,130)
tIndex = int(time.time() - self.battleTimer)
if tIndex > 10:
tIndex = 10
- #screen.blit(self.__images['bt'][tIndex], (25,130))
+ self.__drawableObjects['bt'].goToFrame(tIndex)
+ else:
+ self.__drawableObjects['bt'].makeTransparent(True)