Launcher/Notice_msg.gd

20 lines
404 B
GDScript3
Raw Normal View History

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))
func _process(_delta):
2022-10-28 15:16:00 -05:00
$Label.text = message
func _on_TTL_timeout():
$AnimationPlayer.play("move_off_screen")
func _on_AnimationPlayer_animation_finished(_anim_name):
2022-10-28 15:16:00 -05:00
queue_free()