A class in Root.Township, ATT.MicroTutorial.
Server: spawns micro tutorial entry orbs into chunks listed in MicroTutorialFaceOrbSpawnSettings when those chunks load, and removes them when they unload.
Constructors
| Member | What it is |
|---|
MicroTutorialOrbInjector() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private static readonly Logger logger | Class logger. |
private NetworkPrefab microTutorialFaceOrb | The orb prefab to spawn. |
private readonly Dictionary<Chunk, List<OrbSpawnData>> orbSpawnDataByChunk | Spawn data grouped by chunk. |
private readonly Dictionary<Chunk, List<NetworkEntity>> spawnedOrbEntitiesByChunk | Spawned orb entities grouped by chunk, used for despawning. |
Properties
1 private and internal property
Methods
| Member | What it is |
|---|
override void Initialize() | Server: reads the orb injector data from the settings and sets up spawning per chunk. |
4 private and internal methods
| Member | What it is |
|---|
private void DespawnOrbsForChunk(Chunk chunk) | Destroys the orbs spawned for a chunk, unless players are still in it. |
private void OnDestroy() | Despawns all orbs and unhooks the chunk events. |
private void SetupOrbSpawnData(OrbInjectorData data) | Stores spawn data under its chunk and hooks that chunk's load and unload events. |
private void SpawnOrbsForChunk(Chunk chunk) | Spawns an orb for each spawn data entry in the chunk and sets its tutorial. Skipped when the system is disabled. |