Squeaking in!

This commit is contained in:
Jennie Robinson Faber 2026-05-12 19:11:04 +01:00
parent 0b6d121986
commit 807ad50046
5 changed files with 13 additions and 15 deletions

View file

@ -42,6 +42,8 @@ func _ready():
_screen.doors_closing.connect(func(): _on_doors_closing(true)) _screen.doors_closing.connect(func(): _on_doors_closing(true))
EventBus.game_started.connect(_start_floor) EventBus.game_started.connect(_start_floor)
EventBus.game_lost.connect(func(_reason): $SfxRobotIUnderstand.play())
EventBus.survivor_squeaked_in.connect(_on_survivor_squeaked_in)
func _unhandled_input(event): func _unhandled_input(event):
if event is InputEventKey and event.pressed and not event.echo: if event is InputEventKey and event.pressed and not event.echo:
@ -71,6 +73,8 @@ func _start_floor():
$SfxOpen.play() $SfxOpen.play()
$SfxBell.play() $SfxBell.play()
if _onboarded and randf() < 0.4:
$SfxRobotDeepBreath.play()
_reset_floor_state() _reset_floor_state()
EventBus.doors_opened.emit() EventBus.doors_opened.emit()
@ -110,12 +114,17 @@ func _start_floor():
CONNECT_ONE_SHOT CONNECT_ONE_SHOT
) )
func _on_survivor_squeaked_in():
if not $SfxRobotSoundsDifficult.playing:
$SfxRobotSoundsDifficult.play()
func _on_block_pressed(): func _on_block_pressed():
if doors_closing_flag: if doors_closing_flag:
return return
if _screen.pulse_active: if _screen.pulse_active:
_screen.attempt_block() _screen.attempt_block()
else: else:
$SfxRobotThankYou.play()
_on_doors_closing(false) _on_doors_closing(false)
func _on_pulse_started(duration: float): func _on_pulse_started(duration: float):

View file

@ -10,7 +10,6 @@ func _ready():
EventBus.game_lost.connect(func(_reason: String): _in_play = false) EventBus.game_lost.connect(func(_reason: String): _in_play = false)
$Center/Card/Margin/Column/ResumeButton.pressed.connect(_on_resume_pressed) $Center/Card/Margin/Column/ResumeButton.pressed.connect(_on_resume_pressed)
$Center/Card/Margin/Column/RestartButton.pressed.connect(_on_restart_pressed) $Center/Card/Margin/Column/RestartButton.pressed.connect(_on_restart_pressed)
$Center/Card/Margin/Column/QuitButton.pressed.connect(_on_quit_pressed)
func _unhandled_input(event): func _unhandled_input(event):
if not _in_play: if not _in_play:
@ -35,7 +34,3 @@ func _on_resume_pressed():
func _on_restart_pressed(): func _on_restart_pressed():
get_tree().paused = false get_tree().paused = false
get_tree().reload_current_scene() get_tree().reload_current_scene()
func _on_quit_pressed():
get_tree().paused = false
get_tree().reload_current_scene()

View file

@ -73,16 +73,6 @@ theme_override_styles/hover = SubResource("ButtonStyle")
theme_override_styles/pressed = SubResource("ButtonStyle") theme_override_styles/pressed = SubResource("ButtonStyle")
theme_override_styles/focus = SubResource("ButtonStyle") theme_override_styles/focus = SubResource("ButtonStyle")
[node name="QuitButton" type="Button" parent="Center/Card/Margin/Column"]
text = "QUIT"
theme_override_colors/font_color = Color(0.2, 1, 0.2, 1)
theme_override_colors/font_hover_color = Color(0.5, 1, 0.5, 1)
theme_override_font_sizes/font_size = 24
theme_override_styles/normal = SubResource("ButtonStyle")
theme_override_styles/hover = SubResource("ButtonStyle")
theme_override_styles/pressed = SubResource("ButtonStyle")
theme_override_styles/focus = SubResource("ButtonStyle")
[node name="SpaceHint" type="Label" parent="Center/Card/Margin/Column"] [node name="SpaceHint" type="Label" parent="Center/Card/Margin/Column"]
text = "Space to Resume" text = "Space to Resume"
horizontal_alignment = 1 horizontal_alignment = 1

View file

@ -36,6 +36,9 @@ func _physics_process(_delta):
func _on_area_3d_area_entered(area: Area3D) -> void: func _on_area_3d_area_entered(area: Area3D) -> void:
if area == safety_zone and not _saved: if area == safety_zone and not _saved:
_saved = true _saved = true
var elevator = safety_zone.get_node_or_null("Elevator")
if elevator and elevator.get_door_close_progress() > 0.7:
EventBus.survivor_squeaked_in.emit()
get_tree().create_timer(0.5, false).timeout.connect( get_tree().create_timer(0.5, false).timeout.connect(
func(): queue_free(), func(): queue_free(),
CONNECT_ONE_SHOT CONNECT_ONE_SHOT

View file

@ -21,5 +21,6 @@ signal pulse_started(duration: float)
signal pulse_blocked signal pulse_blocked
signal robot_stun_requested(duration: float) signal robot_stun_requested(duration: float)
signal robot_floor_started(delay: float, robot_speed: float) signal robot_floor_started(delay: float, robot_speed: float)
signal survivor_squeaked_in
@warning_ignore_restore("unused_signal") @warning_ignore_restore("unused_signal")