death
This commit is contained in:
parent
3f569ffd87
commit
b703633b68
13
NS.py
13
NS.py
|
@ -104,6 +104,8 @@ class NS(Game, Animation):
|
|||
lights[NS.LSE].pressed = pressed
|
||||
elif event.key in (K_LEFT, K_l):
|
||||
lights[NS.LSW].pressed = pressed
|
||||
elif event.key == K_z:
|
||||
self.reset()
|
||||
self.last_press = get_ticks()
|
||||
else:
|
||||
if self.get_delegate().compare(event, "reset-game"):
|
||||
|
@ -869,8 +871,8 @@ class Timer(GameChild):
|
|||
|
||||
TEXT = u"\u25F7"
|
||||
BAR_POSITION = 448, 11
|
||||
MAX_TIME = 12000
|
||||
START_TIME = 8000
|
||||
MAX_TIME = 9000
|
||||
START_TIME = 6000
|
||||
|
||||
def __init__(self, parent):
|
||||
GameChild.__init__(self, parent)
|
||||
|
@ -1014,6 +1016,7 @@ class Boss(Animation):
|
|||
|
||||
def reset(self):
|
||||
self.level_index = 0
|
||||
self.kills = 0
|
||||
self.deactivate()
|
||||
self.cancel_flash()
|
||||
self.halt(self.cancel_flash)
|
||||
|
@ -1220,6 +1223,9 @@ class Boss(Animation):
|
|||
elif self.level_index == 2:
|
||||
self.spoopy.set_frameset(0)
|
||||
self.player_defeated = not win
|
||||
self.kills += 1
|
||||
if self.kills >= 3:
|
||||
self.get_game().wipe.start(self.transition_to_title)
|
||||
self.play(self.show_end_dialogue, delay=3000, play_once=True)
|
||||
|
||||
def show_end_dialogue(self):
|
||||
|
@ -1248,6 +1254,9 @@ class Boss(Animation):
|
|||
self.start_level(index)
|
||||
else:
|
||||
self.get_game().reset(True)
|
||||
|
||||
def transition_to_title(self):
|
||||
self.get_game().reset(True)
|
||||
|
||||
def damage(self):
|
||||
if self.level_index == 0:
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 4.0 KiB |
Loading…
Reference in New Issue