Added title screen and onboarding prompt
This commit is contained in:
parent
89c811473b
commit
d1c4c1a35d
7 changed files with 99 additions and 2 deletions
|
|
@ -4,6 +4,7 @@ extends PanelContainer
|
|||
var current_floor := 10
|
||||
var saved_count := 0
|
||||
var doors_closing_flag := false
|
||||
var _onboarded := false
|
||||
|
||||
# Survivors per floor: more at top, fewer as you descend
|
||||
var base_survivors := 2
|
||||
|
|
@ -28,12 +29,14 @@ func _ready():
|
|||
screen.pulse_blocked.connect(_on_pulse_blocked)
|
||||
screen.doors_closing.connect(_on_doors_closing)
|
||||
|
||||
_start_floor()
|
||||
EventBus.game_started.connect(_start_floor)
|
||||
|
||||
func _unhandled_input(event):
|
||||
if event is InputEventKey and event.pressed and not event.echo:
|
||||
if event.keycode == KEY_SPACE:
|
||||
_on_block_pressed()
|
||||
elif event.keycode == KEY_R:
|
||||
get_tree().reload_current_scene()
|
||||
|
||||
# --- Floor lifecycle ---
|
||||
|
||||
|
|
@ -52,7 +55,18 @@ func _start_floor():
|
|||
|
||||
var screen = $PanelMargin/PanelColumn/Screen
|
||||
screen.start()
|
||||
screen.launch_pulse() # first survivor arrives
|
||||
|
||||
if not _onboarded:
|
||||
_onboarded = true
|
||||
screen.show_onboarding("BLOCK\nIN GREEN ZONE")
|
||||
get_tree().create_timer(3.0).timeout.connect(
|
||||
func():
|
||||
screen.end_onboarding()
|
||||
screen.launch_pulse(),
|
||||
CONNECT_ONE_SHOT
|
||||
)
|
||||
else:
|
||||
screen.launch_pulse() # first survivor arrives
|
||||
|
||||
# --- Input ---
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue