variable for how long before the title screen unlock resets from no input
This commit is contained in:
parent
b099c97871
commit
7036ea9ed0
10
NS.py
10
NS.py
|
@ -68,7 +68,7 @@ class NS(Game, Animation):
|
|||
"time":
|
||||
{
|
||||
"int": ["timer-max-time", "timer-start-time", "timer-addition", "sword-delay",
|
||||
"attract-gif-length", "attract-board-length"]
|
||||
"attract-gif-length", "attract-board-length", "attract-reset-countdown"]
|
||||
},
|
||||
"input":
|
||||
{
|
||||
|
@ -520,6 +520,9 @@ class Logo(Sprite):
|
|||
|
||||
|
||||
class Title(Animation):
|
||||
"""
|
||||
Handles displaying and drawing the title screen.
|
||||
"""
|
||||
|
||||
UNLOCK_MOVES = NS.NW, NS.N, NS.NE, NS.NW
|
||||
|
||||
|
@ -649,11 +652,14 @@ class Title(Animation):
|
|||
self.video.move(dy=dsr.top - self.video.location.top)
|
||||
dx, dy = get_delta(self.angle, 5, False)
|
||||
self.video.move(dx, dy)
|
||||
# Hide GIFs/attract mode (or keep them hidden) if input is detected. Set a countdown that will turn
|
||||
# attract mode back on if no input is detected before the countdown expires. As long as input keeps
|
||||
# being detected, this block will keep running and restarting the countdown.
|
||||
if platform.get_pressed():
|
||||
self.video.hide()
|
||||
self.get_game().tony.set_frameset("static")
|
||||
self.halt()
|
||||
self.play(self.show_video, delay=10000, play_once=True)
|
||||
self.play(self.show_video, delay=self.get_configuration("time", "attract-reset-countdown"), play_once=True)
|
||||
self.video.update()
|
||||
self.draw_scores()
|
||||
|
||||
|
|
Loading…
Reference in New Issue