diff --git a/audio/Ambience.wav.import b/audio/Ambience.wav.import index 0771179..3b76ced 100644 --- a/audio/Ambience.wav.import +++ b/audio/Ambience.wav.import @@ -18,7 +18,7 @@ force/max_rate=false force/max_rate_hz=44100 edit/trim=false edit/normalize=false -edit/loop_mode=0 +edit/loop_mode=1 edit/loop_begin=0 edit/loop_end=-1 compress/mode=2 diff --git a/scenes/elevator_panel.gd b/scenes/elevator_panel.gd index 5e863b3..9b541eb 100644 --- a/scenes/elevator_panel.gd +++ b/scenes/elevator_panel.gd @@ -29,7 +29,7 @@ const ROBOT_DELAY_MIN := 1.0 var people_in_elevator := 0 -const PERFECT_STUN_DURATION := 0.25 +const PERFECT_STUN_DURATION := 1.5 const PRE_PULSE_DELAY := 3.5 func _ready(): @@ -44,6 +44,7 @@ func _ready(): EventBus.game_started.connect(_start_floor) EventBus.game_lost.connect(func(_reason): $SfxRobotIUnderstand.play()) EventBus.survivor_squeaked_in.connect(_on_survivor_squeaked_in) + EventBus.robot_close_warning.connect(_on_robot_close_warning) func _unhandled_input(event): if event is InputEventKey and event.pressed and not event.echo: @@ -118,6 +119,10 @@ func _on_survivor_squeaked_in(): if not $SfxRobotSoundsDifficult.playing: $SfxRobotSoundsDifficult.play() +func _on_robot_close_warning(): + if not $SfxRobotDeepBreath.playing: + $SfxRobotDeepBreath.play() + func _on_block_pressed(): if doors_closing_flag: return diff --git a/scenes/game.tscn b/scenes/game.tscn index 18faf79..8c88d4e 100644 --- a/scenes/game.tscn +++ b/scenes/game.tscn @@ -34,6 +34,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.004168272, 1.1920929e-07, [node name="SfxDing" type="AudioStreamPlayer3D" parent="CanvasPanel/ElevatorPanel" unique_id=529226129] stream = ExtResource("4_p57ef") +volume_db = 3.0 [node name="SfxOpen" type="AudioStreamPlayer3D" parent="CanvasPanel/ElevatorPanel" unique_id=3954090] stream = ExtResource("5_u5sy4") @@ -48,6 +49,7 @@ stream = ExtResource("7_bell") [node name="SfxRobotDeepBreath" type="AudioStreamPlayer3D" parent="CanvasPanel/ElevatorPanel" unique_id=1100000001] stream = ExtResource("8_breath") +volume_db = -6.0 [node name="SfxRobotSoundsDifficult" type="AudioStreamPlayer3D" parent="CanvasPanel/ElevatorPanel" unique_id=1100000002] stream = ExtResource("9_diff") @@ -58,10 +60,11 @@ stream = ExtResource("10_under") [node name="SfxRobotThankYou" type="AudioStreamPlayer3D" parent="CanvasPanel/ElevatorPanel" unique_id=1100000004] stream = ExtResource("11_thx") -[node name="Ambience" type="AudioStreamPlayer3D" parent="." unique_id=1100000005] +[node name="Ambience" type="AudioStreamPlayer" parent="." unique_id=1100000005] +process_mode = 3 stream = ExtResource("12_amb") autoplay = true -volume_db = -18.0 +volume_db = -6.0 [node name="ComponentSpawn" parent="." unique_id=649225939 instance=ExtResource("9_0tnpc")] diff --git a/scenes/robot.gd b/scenes/robot.gd index 335bdc8..fadf9fe 100644 --- a/scenes/robot.gd +++ b/scenes/robot.gd @@ -8,6 +8,7 @@ var robot_win: bool = false var speed: float = 1.0 var doors_open: bool = false var stun_remaining: float = 0.0 +var _stalking_close: bool = false var _delay_remaining: float = 0.0 var _spawn_transform: Transform3D @@ -18,7 +19,7 @@ var safety_zone: Area3D func _ready() -> void: _spawn_transform = transform EventBus.doors_opened.connect(func(): doors_open = true) - EventBus.doors_closed.connect(func(_fast: bool): doors_open = false) + EventBus.doors_fully_closed.connect(func(): doors_open = false) EventBus.robot_stun_requested.connect(func(d: float): stun_remaining += d) EventBus.robot_floor_started.connect(_on_floor_started) @@ -73,6 +74,9 @@ func stalking_check(): $Sprite3D.modulate = Color(0.0, 0.0, 0.0) if distance <= STALK_ILLUMINATE_DISTANCE: + if not _stalking_close: + _stalking_close = true + EventBus.robot_close_warning.emit() illuminate() diff --git a/scenes/world.gd b/scenes/world.gd index 123da96..96c6ed7 100644 --- a/scenes/world.gd +++ b/scenes/world.gd @@ -20,6 +20,7 @@ func _ready() -> void: _wall_display.modulate = WALL_DISPLAY_COLOR _wall_display.text = str(_current_floor) EventBus.doors_closed.connect(_on_doors_closed) + EventBus.doors_fully_closed.connect(_free_robot) EventBus.doors_opened.connect(_on_doors_opened) EventBus.floor_changed.connect(_on_floor_changed) EventBus.game_lost.connect(func(_reason: String): _free_robot()) @@ -43,7 +44,6 @@ func _on_doors_closed(_fast: bool) -> void: _hum.play() var next_floor: int = max(1, _current_floor - 1) _wall_display.text = str(next_floor) - _free_robot() func _on_doors_opened() -> void: _tween_dim(1.0) diff --git a/scripts/event_bus.gd b/scripts/event_bus.gd index 20f4176..168d13d 100644 --- a/scripts/event_bus.gd +++ b/scripts/event_bus.gd @@ -21,6 +21,7 @@ signal pulse_started(duration: float) signal pulse_blocked signal robot_stun_requested(duration: float) signal robot_floor_started(delay: float, robot_speed: float) +signal robot_close_warning signal survivor_squeaked_in @warning_ignore_restore("unused_signal")