After imagees
This commit is contained in:
parent
421220e763
commit
279b5e5599
8 changed files with 91 additions and 35 deletions
20
Particles/Scripts/FadeAway.gd
Normal file
20
Particles/Scripts/FadeAway.gd
Normal file
|
@ -0,0 +1,20 @@
|
|||
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()
|
Loading…
Add table
Add a link
Reference in a new issue