mirror of
https://github.com/SEISYUNLie/Platform-Jump.git
synced 2026-10-24 01:41:10 +08:00
24 lines
492 B
GDScript
24 lines
492 B
GDScript
extends Area2D
|
|
|
|
var body_in = false
|
|
@export var hint:Label
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
body_entered.connect(_in)
|
|
body_exited.connect(_out)
|
|
hint.visible = false
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta: float) -> void:
|
|
pass
|
|
|
|
func _in(body):
|
|
if body.is_in_group("player"):
|
|
hint.visible = true
|
|
|
|
func _out(body):
|
|
if body.is_in_group("player"):
|
|
hint.visible = false
|