Files
retromariogodot/scripts/destroyblock.gd
T
2024-07-29 19:18:27 +02:00

12 lines
265 B
GDScript

extends RigidBody2D
@onready var animated_sprite_2d = $AnimatedSprite2D
@onready var animation_player = $AnimationPlayer
func _ready():
animated_sprite_2d.play("default")
func _on_activate_body_entered(body):
if body.is_big:
animation_player.play("destroy")