IRespawnSystem
An interface in Root.Township, ATT.Respawn.
The respawn shrine system: which shrine each player respawns at and how much fuel each shrine has. Implemented by RespawnSystem, a network entity behaviour run by the server.
- Listed in ATT, Features and other game namespaces
- Inherits or implements
IPlayerRespawnPositionProvider - Derived types
RespawnSystem
Methods
| Member | What it is |
|---|---|
IRespawnSystemModel AddSystemModelChangedListener(Action<IRespawnSystemModel> onSystemModelChanged) | Adds a listener called after each model sync, and returns the current model. |
Guid GetActiveShrineIdForPlayer(IPlayer player) | The shrine the player is bound to, or the global shrine's id if none. |
float GetRemainingPoweredTimeForShrineNormalized(Guid shrineId) | Shrine fuel as a fraction of its capacity. 0 for the global shrine. |
IEnumerable<int> GetShrineSubscriberIds(Guid shrineId) | User ids of players bound to the shrine. Empty for the global shrine. |
void RemoveSystemModelChangedListener(Action<IRespawnSystemModel> onSystemModelChanged) | Removes a listener added with AddSystemModelChangedListener. |
void ResetRespawnShrineForPlayer(IPlayer player) | Unbinds the player from their shrine, so they respawn at the global one, and syncs. |
void SetFuelForShrine(Guid shrineId, float value) | Server: sets a shrine's fuel and syncs it. |
void SetRespawnShrineForPlayer(Guid shrineId, IPlayer player) | Binds the player to a shrine, unbinding them from their old one. Synced on the next model tick. |
Used in
Members of other types that take, return or hold a IRespawnSystem: