Adventure Creator  1.66.8
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.RuntimeDocuments Class Reference
Inheritance diagram for AC.RuntimeDocuments:

Public Member Functions

void OnStart ()
 
void OpenDocument (Document document)
 Opens a Document. To view it, a Menu with an Appear Type of OnViewDocument must be present in the Menu Manager. More...
 
void OpenDocument (int documentID)
 Opens a Document. To view it, a Menu with an Appear Type of OnViewDocument must be present in the Menu Manager. More...
 
void CloseDocument ()
 Closes the currently-viewed Document, if there is one
 
bool DocumentIsInCollection (int ID)
 Checks if a particular Document is in the Player's collection More...
 
void AddToCollection (Document document)
 Adds a Document to the Player's own collection More...
 
void RemoveFromCollection (Document document)
 Removes a Document from the Player's own collection More...
 
void ClearCollection ()
 Removes all Documents from the Player's own collection
 
int GetLastOpenPage (Document document)
 Gets the page number to return to when opening a previously-read Document More...
 
void SetLastOpenPage (Document document, int page)
 Sets the page number to return to when a given Document is next opened More...
 
PlayerData SavePlayerDocuments (PlayerData playerData)
 Updates a PlayerData class with its own variables that need saving. More...
 
void AssignPlayerDocuments (PlayerData playerData)
 Restores saved data from a PlayerData class More...
 

Properties

Document ActiveDocument [get]
 
int [] CollectedDocumentIDs [get]
 

Detailed Description

This script stores information about the currently-open Document, as well as any runtime-made changes to all Documents.

Member Function Documentation

◆ AddToCollection()

void AC.RuntimeDocuments.AddToCollection ( Document  document)

Adds a Document to the Player's own collection

Parameters
documentThe Document to add

◆ AssignPlayerDocuments()

void AC.RuntimeDocuments.AssignPlayerDocuments ( PlayerData  playerData)

Restores saved data from a PlayerData class

Parameters
playerDataThe PlayerData class to load from

◆ DocumentIsInCollection()

bool AC.RuntimeDocuments.DocumentIsInCollection ( int  ID)

Checks if a particular Document is in the Player's collection

Parameters
IDThe ID number of the Document to check for
Returns
True if the Document is in the Player's collection

◆ GetLastOpenPage()

int AC.RuntimeDocuments.GetLastOpenPage ( Document  document)

Gets the page number to return to when opening a previously-read Document

Parameters
documentThe Document in question
Returns
The page number to return to when opening a previously-read Document

◆ OnStart()

void AC.RuntimeDocuments.OnStart ( )

This is called when the game begins, and sets up the initial state.

◆ OpenDocument() [1/2]

void AC.RuntimeDocuments.OpenDocument ( Document  document)

Opens a Document. To view it, a Menu with an Appear Type of OnViewDocument must be present in the Menu Manager.

Parameters
documentThe Document to open

◆ OpenDocument() [2/2]

void AC.RuntimeDocuments.OpenDocument ( int  documentID)

Opens a Document. To view it, a Menu with an Appear Type of OnViewDocument must be present in the Menu Manager.

Parameters
documentIDThe ID number of the Document to open

◆ RemoveFromCollection()

void AC.RuntimeDocuments.RemoveFromCollection ( Document  document)

Removes a Document from the Player's own collection

Parameters
documentThe Document to remove

◆ SavePlayerDocuments()

PlayerData AC.RuntimeDocuments.SavePlayerDocuments ( PlayerData  playerData)

Updates a PlayerData class with its own variables that need saving.

Parameters
playerDataThe original PlayerData class
Returns
The updated PlayerData class

◆ SetLastOpenPage()

void AC.RuntimeDocuments.SetLastOpenPage ( Document  document,
int  page 
)

Sets the page number to return to when a given Document is next opened

Parameters
documentThe Document in question
pageThe page number to return to next time

Property Documentation

◆ ActiveDocument

Document AC.RuntimeDocuments.ActiveDocument
get

The currently-active Document

◆ CollectedDocumentIDs

int [] AC.RuntimeDocuments.CollectedDocumentIDs
get

An array of ID numbers that each represent a Document held by the Player