logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class WaveState

    Mutable runtime state for a single actor wave.

    Inheritance
    object
    WaveState
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Wave.Domain.Entities
    Assembly: Serenity.Wave.Domain.dll
    Syntax
    public class WaveState

    Constructors

    WaveState(WaveId, int, int)

    Creates a new pending wave state.

    Declaration
    public WaveState(WaveId id, int index, int totalActors)
    Parameters
    Type Name Description
    WaveId id

    The wave identity.

    int index

    Zero-based wave index in the stage.

    int totalActors

    Total actors to spawn in this wave.

    Properties

    Id

    Gets the identity of this wave.

    Declaration
    public WaveId Id { get; }
    Property Value
    Type Description
    WaveId

    Index

    Zero-based index of this wave within the stage.

    Declaration
    public int Index { get; }
    Property Value
    Type Description
    int

    RemainingActors

    Number of actors remaining alive.

    Declaration
    public int RemainingActors { get; }
    Property Value
    Type Description
    int

    Status

    Current wave status.

    Declaration
    public WaveStatus Status { get; }
    Property Value
    Type Description
    WaveStatus

    TotalActors

    Total actor count spawned in this wave.

    Declaration
    public int TotalActors { get; }
    Property Value
    Type Description
    int

    Methods

    Activate()

    Activates the wave (actors start spawning/attacking).

    Declaration
    public void Activate()

    RecordActorRemoved()

    Records an actor removal. Automatically transitions to Cleared when all actors are defeated.

    Declaration
    public void RecordActorRemoved()

    ToSnapshot()

    Creates an immutable snapshot of the current wave state.

    Declaration
    public WaveSnapshot ToSnapshot()
    Returns
    Type Description
    WaveSnapshot
    In this article
    © 2026 Serenity. All Rights Reserved