16 lines
531 B
GDScript
16 lines
531 B
GDScript
class_name PresentationEvent
|
|
extends RefCounted
|
|
|
|
## A display-only translation of one authoritative GameEvent.
|
|
## Presentation consumers must never alter the source domain event or run state.
|
|
var source_event: GameEvent
|
|
var kind: StringName
|
|
var notification: String
|
|
var accent: Color
|
|
|
|
func _init(source: GameEvent, presentation_kind: StringName, text: String = "", color: Color = Color.WHITE) -> void:
|
|
source_event = source
|
|
kind = presentation_kind
|
|
notification = text if not text.is_empty() else source.message
|
|
accent = color
|