Table of Contents
src / player / landed_effect / landed_effect.gd
Attached Scenes
Code
extends AnimatedSprite2D
const DEFAULT_SCALE = 4
func spawn(player: Player) -> void:
position = player.position
scale = Vector2(1, 1) * DEFAULT_SCALE * min(player.falling_time, 2)
player.get_parent().add_child(self)
func _on_animation_finished() -> void:
queue_free()