Mercurial > fife-parpg
diff demos/shooter/scripts/gui/guis.py @ 469:5994e61cdebd
Added a widget to be displayed after the player completes the game.
Renamed the showHighScoreDialog function to saveScore.
Player can no longer collide with the boss causing the boss to be destroyed. The player now gets destroyed and the boss takes no damage.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Wed, 14 Apr 2010 17:42:24 +0000 |
parents | 4e58dab2fcdc |
children | 7a79dc2a0592 |
line wrap: on
line diff
--- a/demos/shooter/scripts/gui/guis.py Wed Apr 14 16:35:07 2010 +0000 +++ b/demos/shooter/scripts/gui/guis.py Wed Apr 14 17:42:24 2010 +0000 @@ -76,6 +76,10 @@ def hide(self): self._widget.hide() + def isVisible(self): + return self._widget.isVisible() + + class HeadsUpDisplay(object): def __init__(self, world): self._world = world @@ -119,6 +123,16 @@ def hide(self): self._widget.hide() +class WinnerDisplay(object): + def __init__(self): + self._widget = pychan.loadXML('gui/winner.xml') + + def show(self): + self._widget.show() + + def hide(self): + self._widget.hide() + class HighScore(object): def __init__(self, name, score): self._name = name @@ -342,4 +356,7 @@ def hide(self): self.saveHighScores() - self._widget.hide() \ No newline at end of file + self._widget.hide() + + def isVisible(self): + return self._widget.isVisible() \ No newline at end of file