Implemented base class Alert. Implemented Alerts for Cheering Bits, Following, Raid Alert, and Subscription alerts. Added Fonts and Video media.
22 lines
540 B
GDScript
22 lines
540 B
GDScript
@tool
|
|
extends Alert
|
|
class_name RaidAlert
|
|
|
|
@onready var sub_text: Label = %SubText
|
|
@onready var main_text: Label = %MainText
|
|
@onready var timeline: AnimationPlayer = %Timeline
|
|
|
|
var _chatter: String = "None"
|
|
var _raiders: int = 0
|
|
|
|
func setup(chatter: String, raiders: int) -> void:
|
|
_chatter = chatter
|
|
_raiders = raiders
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
main_text.text = _chatter
|
|
sub_text.text = "Raid x%d" % _raiders
|
|
|
|
if Engine.is_editor_hint(): return
|
|
timeline.play(&"default")
|