GlobalPagesManager
A class in Root.Township, Alta.Pages.
Server: records which pages (by provider and hash) have been added to the world, starting with every collection's initial pages, and saves that list. Singleton GlobalPagesManager.Instance.
- Listed in Items, inventory and logic
- Inherits or implements
NetworkEntityBehaviour,ISavable<GlobalPagesManagerSaveData>,ISavableSave<GlobalPagesManagerSaveData>,ISavableSaveBase - Derived types
GlobalPagesManagerSaveData - Documented in Pages and books
Constructors
| Member | What it is |
|---|---|
GlobalPagesManager() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
1 private and internal field
Properties
| Member | What it is |
|---|---|
IEnumerable<ValueTuple<int, uint>> AddedPages { get; } | All recorded pages as provider and hash pairs. |
static GlobalPagesManager Instance { get; private set; } | The active manager. |
Events
| Member | What it is |
|---|---|
event Action<ValueTuple<int, uint>> PageAdded | Raised on the server when a new page is recorded. |
Methods
| Member | What it is |
|---|---|
void AddPage(PageData data) | Server: records a page as added and raises PageAdded if it was new. |
void AddPage(int providerID, uint hash) | Server: records a page as added and raises PageAdded if it was new. |
void DissolvePage(PaperPageInstance paper, Interactor interactor) | Plays the dissolving page effect for a paper page, moving toward the front of the player. |
void DissolvePage(PaperPageInstance paper, PlayerController controller) | Plays the dissolving page effect for a paper page, moving toward the front of the player. |
override void InitializeAsServer(SpawnData spawnData) | Server: if nothing was loaded, fills the list with every page collection's initial pages. |
static bool IsNew(int providerID, uint pageHash) | True when the page has not been recorded yet. |
1 private and internal method
| Member | What it is |
|---|---|
private void Awake() | Sets Instance, or destroys itself if another one exists. |