Mercurial > fife-parpg
comparison 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 |
comparison
equal
deleted
inserted
replaced
468:ebbb420a90b9 | 469:5994e61cdebd |
---|---|
74 self._widget.show() | 74 self._widget.show() |
75 | 75 |
76 def hide(self): | 76 def hide(self): |
77 self._widget.hide() | 77 self._widget.hide() |
78 | 78 |
79 def isVisible(self): | |
80 return self._widget.isVisible() | |
81 | |
82 | |
79 class HeadsUpDisplay(object): | 83 class HeadsUpDisplay(object): |
80 def __init__(self, world): | 84 def __init__(self, world): |
81 self._world = world | 85 self._world = world |
82 self._widget = pychan.loadXML('gui/hud.xml') | 86 self._widget = pychan.loadXML('gui/hud.xml') |
83 | 87 |
110 self._livestext.text = text | 114 self._livestext.text = text |
111 | 115 |
112 class GameOverDisplay(object): | 116 class GameOverDisplay(object): |
113 def __init__(self): | 117 def __init__(self): |
114 self._widget = pychan.loadXML('gui/gameover.xml') | 118 self._widget = pychan.loadXML('gui/gameover.xml') |
119 | |
120 def show(self): | |
121 self._widget.show() | |
122 | |
123 def hide(self): | |
124 self._widget.hide() | |
125 | |
126 class WinnerDisplay(object): | |
127 def __init__(self): | |
128 self._widget = pychan.loadXML('gui/winner.xml') | |
115 | 129 |
116 def show(self): | 130 def show(self): |
117 self._widget.show() | 131 self._widget.show() |
118 | 132 |
119 def hide(self): | 133 def hide(self): |
341 self._widget.show() | 355 self._widget.show() |
342 | 356 |
343 def hide(self): | 357 def hide(self): |
344 self.saveHighScores() | 358 self.saveHighScores() |
345 self._widget.hide() | 359 self._widget.hide() |
360 | |
361 def isVisible(self): | |
362 return self._widget.isVisible() |