using Unity.Entities;
namespace ProjectM.Simulation
{
///
/// Baked config for the Husk wave/threat director (singleton). The director escalates: wave N spawns
/// BaseCount + (N-1)*CountPerWave Husks (round-robin over the pool) at a
/// deterministic ring around the , one every SpawnIntervalTicks; once a wave is
/// cleared the field stays calm for LullTicks before the next, bigger wave. Replaces the flat sustain.
///
public struct WaveDirector : IComponentData
{
public float RingRadius;
public int RingSlots;
public int BaseCount;
public int CountPerWave;
public int SpawnIntervalTicks;
public int LullTicks;
}
/// Baked pool of Husk prefab variants the director draws from round-robin (Grunt / Swarmer / Brute / ...).
public struct WaveEnemyPrefab : IBufferElementData
{
public Entity Prefab;
}
/// Phase constants for .
public static class WavePhase
{
public const byte Lull = 0;
public const byte Spawning = 1;
}
///
/// Runtime state of the wave director (server-only singleton; not replicated). Tracks the current wave, the
/// phase (lull vs spawning), the next action tick, how many Husks remain to spawn this wave, and a monotonic
/// spawn counter (drives the ring slot + the round-robin prefab pick).
///
public struct WaveState : IComponentData
{
public int WaveNumber;
public byte Phase;
public uint NextActionTick;
public int RemainingToSpawn;
public int SpawnCounter;
}
}