Files
retromariogodot/scripts/itemblock.gd
T

15 lines
265 B
GDScript

extends RigidBody2D
@onready var animated_sprite_2d = $AnimatedSprite2D
var destroyed = false
func _ready():
animated_sprite_2d.play("idle")#
func _on_activate_body_entered(body):
if destroyed:
return
destroyed = true
animated_sprite_2d.play("destroy")