RespawnBeaconController
A class in Root.Township, ATT.Respawn.
Client: spawns a beacon view for each powered (non-global) respawn shrine and updates it when the respawn model changes.
- Listed in ATT, Features and other game namespaces
- Inherits or implements
NetworkEntityBehaviour,IRespawnBeaconController
Constructors
| Member | What it is |
|---|---|
RespawnBeaconController() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|---|
private static Logger logger | Class logger. |
private Dictionary<Guid, IRespawnBeaconView> respawnBeaconViews | Beacon views by shrine ID. |
private IRespawnSystem respawnSystem | Injected respawn system. |
Properties
1 private and internal property
| Member | What it is |
|---|---|
private IRespawnSystemSettings SystemSettings { get; } | The global RespawnSystemSettings. |
Methods
| Member | What it is |
|---|---|
override void OnConnected(Player player) | Only calls the base method. |
void OnModelChanged(IRespawnSystemModel model) | Client: spawns the beacons on the first update, then passes each shrine's model to its beacon view. |
5 private and internal methods
| Member | What it is |
|---|---|
private void Inject(IRespawnSystem respawnSystem) | VContainer injection of the respawn system. |
private void OnDestroy() | Stops listening to model changes. |
private void SpawnAllBeaconViews(IRespawnSystemModel model) | Spawns a beacon view for every shrine in the model that isn't the global shrine. |
private void SpawnBeaconViewForShrine(Guid shrineId) | Takes a pooled beacon from the shrine's settings, places it at the beacon position and stores its view. |
private void Start() | Creates the view lookup and listens to the respawn system's model changes. |