You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
411 B
GDScript
21 lines
411 B
GDScript
extends LevelActive
|
|
class_name LevelActivePressButton
|
|
|
|
|
|
func on_body_entered_count_changed() -> void:
|
|
if body_entered_count > 0:
|
|
set_open(true)
|
|
else:
|
|
set_open(false)
|
|
|
|
func on_set_open(is_open_set: bool) -> void:
|
|
pass
|
|
|
|
func on_process_open(rate: float) -> void:
|
|
var mesh: Node3D = %Mesh as Node3D
|
|
if not mesh:
|
|
print("Mesh not found!")
|
|
return
|
|
var offset_y = rate * -0.06
|
|
mesh.position.y = offset_y
|