cawez_puzzlebox/primitives/assign_force/player_can_float.gd
2024-06-28 22:06:18 -04:00

15 lines
317 B
GDScript

extends Area3D
# Called when the node enters the scene tree for the first time.
func _ready():
body_entered.connect(_on_area_entered)
body_exited.connect(_on_area_exit)
func _on_area_entered(body : RigidBody3D) -> void:
body.can_float += 1
func _on_area_exit(body : RigidBody3D) -> void:
body.can_float -= 1