You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
349 B
15 lines
349 B
extends Node3D
|
|
|
|
@export var isUp:bool = true
|
|
@export var upPosition:float = 45
|
|
@export var downPosition:float = -45
|
|
|
|
@onready var visual_lever: Node3D = $Visuals/VisualLever
|
|
|
|
signal changed(isUp: bool)
|
|
|
|
func _on_interactable_on_hit() -> void:
|
|
isUp = !isUp
|
|
changed.emit(isUp)
|
|
visual_lever.rotation_degrees.x = upPosition if isUp else downPosition
|