Add sounds
This commit is contained in:
parent
807ad50046
commit
2e23faf112
12 changed files with 146 additions and 0 deletions
|
|
@ -38,6 +38,10 @@ func _set_door_collision(enabled: bool):
|
|||
$ElevatorDoorRight/CollisionShape3D.disabled = not enabled
|
||||
$ElevatorDoorLeft/CollisionShape3D.disabled = not enabled
|
||||
|
||||
func get_door_close_progress() -> float:
|
||||
var cur: float = $ElevatorDoorRight.position.x
|
||||
return clamp((DOOR_OPEN_X - cur) / (DOOR_OPEN_X - DOOR_CLOSED_X), 0.0, 1.0)
|
||||
|
||||
func _tween_doors(target_x: float, duration: float):
|
||||
if _tween:
|
||||
_tween.kill()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue