20 lines
443 B
GDScript
20 lines
443 B
GDScript
extends Sprite2D
|
|
|
|
@onready var parent = get_parent()
|
|
|
|
var duration = 0.25
|
|
|
|
func _ready():
|
|
self_modulate = parent.self_modulate
|
|
texture = parent.texture
|
|
scale = parent.scale
|
|
offset = parent.offset
|
|
global_position = parent.global_position
|
|
rotation = parent.rotation
|
|
|
|
var tween = create_tween()
|
|
tween.tween_property(self, "modulate", Color8(255, 255, 255, 0), duration)
|
|
|
|
await get_tree().create_timer(duration).timeout
|
|
|
|
queue_free()
|