Struct SpawnType
Logical classification of spawnable entities (e.g. Character, Hazard, Projectile).
Immutable value object that supports equality comparison and hashing.
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
Properties
IsValid
Checks if this SpawnType has a valid, non-empty value.
Declaration
public bool IsValid { get; }
Property Value
Methods
Equals(SpawnType)
Declaration
public bool Equals(SpawnType other)
Parameters
Returns
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
operator ==(SpawnType, SpawnType)
Declaration
public static bool operator ==(SpawnType left, SpawnType right)
Parameters
Returns
explicit operator SpawnType(string)
Declaration
public static explicit operator SpawnType(string value)
Parameters
| Type |
Name |
Description |
| string |
value |
|
Returns
implicit operator string(SpawnType)
Declaration
public static implicit operator string(SpawnType type)
Parameters
Returns
operator !=(SpawnType, SpawnType)
Declaration
public static bool operator !=(SpawnType left, SpawnType right)
Parameters
Returns
Implements