15 lines
317 B
GDScript
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
|