Squeaking in!
This commit is contained in:
parent
0b6d121986
commit
807ad50046
5 changed files with 13 additions and 15 deletions
|
|
@ -42,6 +42,8 @@ func _ready():
|
|||
_screen.doors_closing.connect(func(): _on_doors_closing(true))
|
||||
|
||||
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):
|
||||
if event is InputEventKey and event.pressed and not event.echo:
|
||||
|
|
@ -71,6 +73,8 @@ func _start_floor():
|
|||
|
||||
$SfxOpen.play()
|
||||
$SfxBell.play()
|
||||
if _onboarded and randf() < 0.4:
|
||||
$SfxRobotDeepBreath.play()
|
||||
_reset_floor_state()
|
||||
EventBus.doors_opened.emit()
|
||||
|
||||
|
|
@ -110,12 +114,17 @@ func _start_floor():
|
|||
CONNECT_ONE_SHOT
|
||||
)
|
||||
|
||||
func _on_survivor_squeaked_in():
|
||||
if not $SfxRobotSoundsDifficult.playing:
|
||||
$SfxRobotSoundsDifficult.play()
|
||||
|
||||
func _on_block_pressed():
|
||||
if doors_closing_flag:
|
||||
return
|
||||
if _screen.pulse_active:
|
||||
_screen.attempt_block()
|
||||
else:
|
||||
$SfxRobotThankYou.play()
|
||||
_on_doors_closing(false)
|
||||
|
||||
func _on_pulse_started(duration: float):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue