logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Struct SpawnType

    Logical classification of spawnable entities (e.g. Character, Hazard, Projectile). Immutable value object that supports equality comparison and hashing.

    Implements
    IEquatable<SpawnType>
    Inherited Members
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Serenity.GameSpawner.Domain.ValueObjects
    Assembly: Serenity.GameSpawner.Domain.dll
    Syntax
    public readonly struct SpawnType : IEquatable<SpawnType>

    Constructors

    SpawnType(string)

    Creates a new SpawnType with the specified identifier.

    Declaration
    public SpawnType(string value)
    Parameters
    Type Name Description
    string value

    The unique string identifier. Cannot be null.

    Fields

    Value

    The unique string identifier for this spawn type.

    Declaration
    public readonly string Value
    Field Value
    Type Description
    string

    Properties

    IsValid

    Checks if this SpawnType has a valid, non-empty value.

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    bool

    Methods

    Equals(SpawnType)

    Declaration
    public bool Equals(SpawnType other)
    Parameters
    Type Name Description
    SpawnType other
    Returns
    Type Description
    bool

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    ValueType.Equals(object)

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    ValueType.GetHashCode()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    ValueType.ToString()

    Operators

    operator ==(SpawnType, SpawnType)

    Declaration
    public static bool operator ==(SpawnType left, SpawnType right)
    Parameters
    Type Name Description
    SpawnType left
    SpawnType right
    Returns
    Type Description
    bool

    explicit operator SpawnType(string)

    Declaration
    public static explicit operator SpawnType(string value)
    Parameters
    Type Name Description
    string value
    Returns
    Type Description
    SpawnType

    implicit operator string(SpawnType)

    Declaration
    public static implicit operator string(SpawnType type)
    Parameters
    Type Name Description
    SpawnType type
    Returns
    Type Description
    string

    operator !=(SpawnType, SpawnType)

    Declaration
    public static bool operator !=(SpawnType left, SpawnType right)
    Parameters
    Type Name Description
    SpawnType left
    SpawnType right
    Returns
    Type Description
    bool

    Implements

    IEquatable<T>
    In this article
    © 2026 Serenity. All Rights Reserved