2022-10-28 15:16:00 -05:00
|
|
|
extends Node2D
|
|
|
|
|
|
|
|
var message
|
|
|
|
var type
|
|
|
|
|
|
|
|
func _ready():
|
|
|
|
if type == "warning":
|
|
|
|
$Label.add_color_override("font_color", Color(255, 69, 0))
|
|
|
|
if type == "alert":
|
|
|
|
$Label.add_color_override("font_color", Color(255, 0, 0))
|
|
|
|
|
2022-10-28 15:42:31 -05:00
|
|
|
func _process(_delta):
|
2022-10-28 15:16:00 -05:00
|
|
|
$Label.text = message
|
|
|
|
|
|
|
|
func _on_TTL_timeout():
|
|
|
|
$AnimationPlayer.play("move_off_screen")
|
|
|
|
|
2022-10-28 15:42:31 -05:00
|
|
|
func _on_AnimationPlayer_animation_finished(_anim_name):
|
2022-10-28 15:16:00 -05:00
|
|
|
queue_free()
|