Add sounds

This commit is contained in:
Jennie Robinson Faber 2026-05-12 19:11:09 +01:00
parent 807ad50046
commit 2e23faf112
12 changed files with 146 additions and 0 deletions

View file

@ -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()