23 lines
497 B
GDScript
23 lines
497 B
GDScript
extends Label3D
|
|
|
|
func _ready() -> void:
|
|
modulate.a = 0
|
|
outline_modulate.a = 0
|
|
await get_tree().process_frame
|
|
|
|
await Level.level.level_started
|
|
|
|
var t := create_tween()
|
|
t.tween_property(self, "modulate:a", 1., .5)
|
|
t.parallel().tween_property(self, "outline_modulate:a", 1., .5)
|
|
|
|
await SignalBus.building_destroyed
|
|
|
|
t.stop()
|
|
t = create_tween()
|
|
t.tween_property(self, "modulate:a", 0., .5)
|
|
t.parallel().tween_property(self, "outline_modulate:a", 0., .5)
|
|
|
|
await t.finished
|
|
|
|
queue_free()
|