feat: enhanced sounds
This commit is contained in:
parent
09e8f5b882
commit
371334d85a
Binary file not shown.
Binary file not shown.
|
|
@ -2,10 +2,11 @@
|
|||
class_name Dolly
|
||||
extends Node3D
|
||||
|
||||
@export var start_arrived : bool = false
|
||||
@export var pre_arrival_time : float = 10.0
|
||||
|
||||
@export var pre_arrival_time : float = 17.0
|
||||
@export var arrival_time : float = 15.0
|
||||
@export var pre_leave_time : float = 20.0
|
||||
@export var door_close_time : float = 1.0
|
||||
@export var leave_time : float = 16.0
|
||||
@export var post_leave_time : float = 5.0
|
||||
|
||||
|
|
@ -18,10 +19,9 @@ extends Node3D
|
|||
var tween : Tween = null
|
||||
|
||||
func _ready() -> void:
|
||||
if not start_arrived:
|
||||
for child in get_children(true):
|
||||
if not child.visible: continue
|
||||
child.global_position = origination.global_position
|
||||
for child in get_children(true):
|
||||
if not child.visible: continue
|
||||
child.global_position = origination.global_position
|
||||
|
||||
|
||||
## One arrival and departure
|
||||
|
|
@ -32,7 +32,7 @@ func cycle() -> void:
|
|||
|
||||
func arrive() -> void:
|
||||
%SubwayTrainAudio.play(0)
|
||||
await get_tree().create_timer(16).timeout
|
||||
await get_tree().create_timer(pre_arrival_time).timeout
|
||||
if tween: tween.kill()
|
||||
tween = create_tween().set_trans(Tween.TRANS_CIRC).set_ease(Tween.EASE_OUT)
|
||||
for child in get_children(true):
|
||||
|
|
@ -45,7 +45,7 @@ func arrive() -> void:
|
|||
func leave() -> void:
|
||||
await get_tree().create_timer(pre_leave_time).timeout
|
||||
subway.door_open = false
|
||||
await get_tree().create_timer(1).timeout
|
||||
await get_tree().create_timer(door_close_time).timeout
|
||||
if tween: tween.kill()
|
||||
tween = create_tween().set_trans(Tween.TRANS_QUART).set_ease(Tween.EASE_IN)
|
||||
for child in get_children(true):
|
||||
|
|
@ -57,4 +57,3 @@ func leave() -> void:
|
|||
if not child.visible: continue
|
||||
# Warp back
|
||||
child.global_position = origination.global_position
|
||||
arrive()
|
||||
|
|
|
|||
Loading…
Reference in New Issue