27 lines
524 B
GDScript3
27 lines
524 B
GDScript3
extends Node2D
|
|
|
|
|
|
# Declare member variables here. Examples:
|
|
# var a: int = 2
|
|
# var b: String = "text"
|
|
onready var animated_sprite = $AnimatedSprite
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
self.visible = false
|
|
|
|
|
|
|
|
func _process(delta: float) -> void:
|
|
pass
|
|
#animated_sprite.play("idle")
|
|
|
|
|
|
func _on_Area2D_body_entered(body):
|
|
self.visible = true
|
|
animated_sprite.play("appear")
|
|
|
|
|
|
func _on_AnimatedSprite_animation_finished():
|
|
animated_sprite.play("idle")
|