Add muzak, muffled screams, virtua hand
This commit is contained in:
parent
acb10d18a4
commit
54067d2087
15 changed files with 198 additions and 29 deletions
|
|
@ -30,7 +30,7 @@ const ROBOT_DELAY_MIN := 1.0
|
|||
var people_in_elevator := 0
|
||||
|
||||
const PERFECT_STUN_DURATION := 1.5
|
||||
const PRE_PULSE_DELAY := 3.5
|
||||
const DING_TO_DOORS_DELAY := 2.0
|
||||
|
||||
func _ready():
|
||||
_close_button.text = "CLOSE"
|
||||
|
|
@ -72,12 +72,18 @@ func _start_floor():
|
|||
_onboarded = true
|
||||
EventBus.debug_starting_floor = 0
|
||||
|
||||
$SfxOpen.play()
|
||||
$SfxBell.play()
|
||||
if _onboarded and randf() < 0.4:
|
||||
$SfxRobotDeepBreath.play()
|
||||
_reset_floor_state()
|
||||
EventBus.doors_opened.emit()
|
||||
get_tree().create_timer(DING_TO_DOORS_DELAY, false).timeout.connect(
|
||||
func():
|
||||
if not is_instance_valid(self) or doors_closing_flag:
|
||||
return
|
||||
$SfxOpen.play()
|
||||
EventBus.doors_opened.emit(),
|
||||
CONNECT_ONE_SHOT
|
||||
)
|
||||
|
||||
EventBus.people_changed.emit(people_in_elevator, THRESHOLD)
|
||||
EventBus.floor_changed.emit(current_floor)
|
||||
|
|
@ -97,23 +103,13 @@ func _start_floor():
|
|||
|
||||
if not _onboarded:
|
||||
_onboarded = true
|
||||
_screen.show_onboarding("BLOCK\nIN GREEN ZONE")
|
||||
get_tree().create_timer(3.0, false).timeout.connect(
|
||||
func():
|
||||
if not is_instance_valid(_screen):
|
||||
return
|
||||
_screen.end_onboarding()
|
||||
_screen.launch_pulse(),
|
||||
CONNECT_ONE_SHOT
|
||||
)
|
||||
else:
|
||||
get_tree().create_timer(PRE_PULSE_DELAY, false).timeout.connect(
|
||||
func():
|
||||
if not is_instance_valid(self) or doors_closing_flag:
|
||||
return
|
||||
_screen.launch_pulse(),
|
||||
CONNECT_ONE_SHOT
|
||||
)
|
||||
EventBus.doors_nearly_opened.connect(
|
||||
func():
|
||||
if not is_instance_valid(self) or doors_closing_flag:
|
||||
return
|
||||
_screen.launch_pulse(),
|
||||
CONNECT_ONE_SHOT
|
||||
)
|
||||
|
||||
func _on_survivor_squeaked_in():
|
||||
if not $SfxRobotSoundsDifficult.playing:
|
||||
|
|
@ -126,6 +122,7 @@ func _on_robot_close_warning():
|
|||
func _on_block_pressed():
|
||||
if doors_closing_flag:
|
||||
return
|
||||
EventBus.block_pressed.emit()
|
||||
if _screen.pulse_active:
|
||||
_screen.attempt_block()
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue