Interface ISpawnPointResolver
Domain intention for resolving spawn point identifiers to spawn points. Unity implementations collect SpawnPoint components from the stage prefab hierarchy.
Namespace: Serenity.Stage.Application.Interfaces
Assembly: Serenity.Stage.Application.dll
Syntax
public interface ISpawnPointResolver
Methods
Resolve(SpawnPointId)
Resolves a spawn point by its identifier, throwing if not found.
Declaration
ISpawnPoint Resolve(SpawnPointId id)
Parameters
| Type | Name | Description |
|---|---|---|
| SpawnPointId | id | The spawn point identifier to look up. |
Returns
| Type | Description |
|---|---|
| ISpawnPoint | The resolved spawn point. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Thrown when no spawn point matches the given id. |
TryResolve(SpawnPointId, out ISpawnPoint)
Attempts to resolve a spawn point by its identifier.
Declaration
bool TryResolve(SpawnPointId id, out ISpawnPoint point)
Parameters
| Type | Name | Description |
|---|---|---|
| SpawnPointId | id | The spawn point identifier to look up. |
| ISpawnPoint | point | The resolved spawn point, or null if not found. |
Returns
| Type | Description |
|---|---|
| bool | True if the spawn point was found; false otherwise. |