Launcher/Notice_msg.gd

20 lines
402 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):
$Label.text = message
func _on_TTL_timeout():
$AnimationPlayer.play("move_off_screen")
func _on_AnimationPlayer_animation_finished(anim_name):
queue_free()