logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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 one actor of the current wave was removed without saying which. It exists for callers that cannot name the actor, such as the editor's force-advance; anything that knows the actor calls RecordActorRemoved(string), which cannot count a late removal from an earlier wave against the current one.

    Declaration
    void RecordActorRemoved()

    RecordActorRemoved(string)

    Records that the actor actorId was removed. It counts only when that actor was spawned by the current wave: an actor of an earlier wave removed late, an actor removed twice, or an id the wave never spawned changes nothing. Clears the wave when its last actor is gone.

    Declaration
    void RecordActorRemoved(string actorId)
    Parameters
    Type Name Description
    string actorId

    The removed actor's id — the value of the id the character spawn service returned when the wave spawned it.

    StartNextWave()

    Starts the next wave in the sequence.

    Declaration
    void StartNextWave()
    In this article
    © 2026 Serenity. All Rights Reserved