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":
|
"time":
|
||||||
{
|
{
|
||||||
"int": ["timer-max-time", "timer-start-time", "timer-addition", "sword-delay",
|
"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":
|
"input":
|
||||||
{
|
{
|
||||||
|
@ -520,6 +520,9 @@ class Logo(Sprite):
|
||||||
|
|
||||||
|
|
||||||
class Title(Animation):
|
class Title(Animation):
|
||||||
|
"""
|
||||||
|
Handles displaying and drawing the title screen.
|
||||||
|
"""
|
||||||
|
|
||||||
UNLOCK_MOVES = NS.NW, NS.N, NS.NE, NS.NW
|
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)
|
self.video.move(dy=dsr.top - self.video.location.top)
|
||||||
dx, dy = get_delta(self.angle, 5, False)
|
dx, dy = get_delta(self.angle, 5, False)
|
||||||
self.video.move(dx, dy)
|
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():
|
if platform.get_pressed():
|
||||||
self.video.hide()
|
self.video.hide()
|
||||||
self.get_game().tony.set_frameset("static")
|
self.get_game().tony.set_frameset("static")
|
||||||
self.halt()
|
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.video.update()
|
||||||
self.draw_scores()
|
self.draw_scores()
|
||||||
|
|
||||||
|
|
1
config
1
config
|
@ -43,6 +43,7 @@ timer-addition = 1000
|
||||||
sword-delay = 300
|
sword-delay = 300
|
||||||
attract-gif-length = 10000
|
attract-gif-length = 10000
|
||||||
attract-board-length = 3600
|
attract-board-length = 3600
|
||||||
|
attract-reset-countdown = 30000
|
||||||
|
|
||||||
[bgm]
|
[bgm]
|
||||||
title = resource/bgm/title.ogg, .65
|
title = resource/bgm/title.ogg, .65
|
||||||
|
|
Loading…
Reference in New Issue