Skip to main content

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.

Constructors​

MemberWhat it is
GlobalPagesManager()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private HashSet<ValueTuple<int, uint>> addedPagesBacking set for AddedPages.

Properties​

MemberWhat 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​

MemberWhat it is
event Action<ValueTuple<int, uint>> PageAddedRaised on the server when a new page is recorded.

Methods​

MemberWhat 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
MemberWhat it is
private void Awake()Sets Instance, or destroys itself if another one exists.