Interface IWaveService
Service interface for managing waves within a rail shooter stage. A stage consists of sequential waves; clearing all waves completes the stage.
Namespace: Serenity.Wave.Application.Interfaces.Services
Assembly: Serenity.Wave.Application.dll
Syntax
public interface IWaveService : IService, IFoundationSettings
Properties
AllWavesCleared
Returns true if all waves have been cleared.
Declaration
bool AllWavesCleared { get; }
Property Value
| Type | Description |
|---|---|
| bool |
CurrentWaveIndex
Gets the zero-based index of the current wave.
Declaration
int CurrentWaveIndex { get; }
Property Value
| Type | Description |
|---|---|
| int |
TotalWaves
Gets the total number of waves configured for this stage.
Declaration
int TotalWaves { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
ConfigureWaves(WaveConfig[])
Registers the full wave sequence using typed configuration models. Must be called before starting the first wave.
Declaration
void ConfigureWaves(WaveConfig[] waveConfigs)
Parameters
| Type | Name | Description |
|---|---|---|
| WaveConfig[] | waveConfigs | Ordered array of wave configurations. |
ConfigureWaves(int, int[])
Registers the full wave sequence for the current stage. Must be called before starting the first wave.
Declaration
void ConfigureWaves(int totalWaves, int[] charactersPerWave)
Parameters
| Type | Name | Description |
|---|---|---|
| int | totalWaves | Number of waves in this stage. |
| int[] | charactersPerWave | Array of character counts for each wave. |
GetCurrentWaveSnapshot()
Returns the snapshot of the current active wave.
Declaration
WaveSnapshot GetCurrentWaveSnapshot()
Returns
| Type | Description |
|---|---|
| WaveSnapshot |
RecordActorRemoved()
Records that an character in the current wave was defeated. Automatically advances to wave-cleared when the last character falls.
Declaration
void RecordActorRemoved()
StartNextWave()
Starts the next wave in the sequence.
Declaration
void StartNextWave()