A class in Root.Township, Alta.Pages.
Server: keeps a book of one page collection tied to a spot, spawning the book if missing and sending it back when a linked fire is lit.
Constructors
| Member | What it is |
|---|
BookRestrictor() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private Book bookOnServer | The book being kept here. |
private Book bookPrefab | Book prefab spawned if there is none. |
private PageCollection collection | Page collection the book holds; saved. |
private Fire summoningFire | Optional fire that calls the book back when lit. |
Methods
| Member | What it is |
|---|
override void InitializeAsServer(SpawnData spawnData) | Server: finds or spawns the book, registers and docks it, and hooks the summoning fire. |
1 private and internal method
| Member | What it is |
|---|
private void CheckFireSummon(bool isLit) | When the summoning fire is lit and nobody holds the book, returns the book to its spot with an effect. |