Struct DiplomacyWarDeclaredEvent
ENGINE LAYER - Diplomatic event definitions
Architecture:
- Structs for zero-allocation EventBus
- Emitted by DiplomacySystem on state changes
- GAME layer subscribes to trigger UI updates, notifications, AI reactions
Pattern 3: Event-Driven Architecture (Zero-Allocation)
- Events are structs (no boxing)
- EventBus uses EventQueue{T} wrapper
- Frame-coherent processing
public struct DiplomacyWarDeclaredEvent : IGameEvent
- Implements
Constructors
DiplomacyWarDeclaredEvent(ushort, ushort, int)
public DiplomacyWarDeclaredEvent(ushort attacker, ushort defender, int tick)
Parameters
attackerushortdefenderushorttickint
Fields
attackerID
public readonly ushort attackerID
Field Value
- ushort
defenderID
public readonly ushort defenderID
Field Value
- ushort
tick
public readonly int tick
Field Value
- int
Properties
TimeStamp
Timestamp when the event was emitted (set automatically by EventBus).
public float TimeStamp { readonly get; set; }
Property Value
- float