Class WaveConfig
Immutable configuration for a single wave within a stage. Defines the wave index, total actor count, and per-archetype distribution. Pure C# — no engine dependencies.
Inherited Members
Namespace: Serenity.Wave.Domain.Configuration
Assembly: Serenity.Wave.Domain.dll
Syntax
public class WaveConfig
Remarks
Archetype distribution is expressed as named integer counts.
The mapping to CharacterArchetype enum values happens at the Unity layer
where both assemblies are available, keeping Wave.Domain independent.
Constructors
WaveConfig(int, int)
Creates a new WaveConfig with validation.
Declaration
public WaveConfig(int waveIndex, int totalActors)
Parameters
| Type | Name | Description |
|---|---|---|
| int | waveIndex | Zero-based index. Must be >= 0. |
| int | totalActors | Total actor count. Must be >= 0. |
Fields
TotalActors
Total number of actors in this wave.
Declaration
public readonly int TotalActors
Field Value
| Type | Description |
|---|---|
| int |
WaveIndex
Zero-based wave index within the stage.
Declaration
public readonly int WaveIndex
Field Value
| Type | Description |
|---|---|
| int |
Methods
FromSpawnEntries(int, IReadOnlyList<SpawnEntry>)
Builds the configuration of a wave from the spawn entries authored for it. The wave's total is every actor those entries spawn — the sum of each entry's Count — because a wave is cleared once each of them has been removed, not once per entry.
Declaration
public static WaveConfig FromSpawnEntries(int waveIndex, IReadOnlyList<SpawnEntry> spawnEntries)
Parameters
| Type | Name | Description |
|---|---|---|
| int | waveIndex | Zero-based index. Must be >= 0. |
| IReadOnlyList<SpawnEntry> | spawnEntries | The wave's spawn entries. A missing list or entry adds no actors, and neither does an entry whose count is not positive. |
Returns
| Type | Description |
|---|---|
| WaveConfig | The wave's configuration. |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |