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

Public Member Functions

 Document (int[] idArray)
 The default Constructor. More...
 
 Document (int _ID)
 A Constructor in which the ID is explicitly set. More...
 
void ClearIDs ()
 
void ShowGUI (string apiPrefix)
 
string GetTranslatableString (int index)
 
int GetTranslationID (int index)
 Gets the translation ID of a given text index. More...
 
int GetNumTranslatables ()
 Gets the maximum number of possible translatable texts. More...
 
bool HasExistingTranslation (int index)
 Checks if a given text index has already been assigned a unique translation ID. More...
 
void SetTranslationID (int index, int _lineID)
 Sets the translation ID of a given text index More...
 
string GetOwner ()
 Gets the name of the translatable text's owner. In the case of speech text, it is the name of the character. In the case of menu element text, it is the name of the menu element. More...
 
bool OwnerIsPlayer ()
 Checks if the translatable text's owner is a Player. This is necessary for speech lines, since multiple player prefabs can feasibly share the same line. More...
 
AC_TextType GetTranslationType (int index)
 Gets the translation type of a given text index. More...
 
bool CanTranslate (int index)
 Checks if a given text index can and should be translated. More...
 

Public Attributes

int ID
 
string title
 
int titleLineID = -1
 
bool rememberLastOpenPage = false
 
bool carryOnStart = false
 
Texture2D texture
 
List< JournalPagepages = new List<JournalPage>()
 
bool isEditing
 

Properties

string Title [get]
 

Detailed Description

An asset file that stores data for a document, which can be viewed/read in a Menu

Constructor & Destructor Documentation

◆ Document() [1/2]

AC.Document.Document ( int []  idArray)

The default Constructor.

Parameters
idArrayAn array of already-used ID numbers, so that a unique ID number can be assigned

◆ Document() [2/2]

AC.Document.Document ( int  _ID)

A Constructor in which the ID is explicitly set.

Parameters
_IDThe ID number to assign

Member Function Documentation

◆ CanTranslate()

bool AC.Document.CanTranslate ( int  index)

Checks if a given text index can and should be translated.

Parameters
indexThe index of the translatable text
Returns
True if the text can and should be translated

Implements AC.ITranslatable.

◆ GetNumTranslatables()

int AC.Document.GetNumTranslatables ( )

Gets the maximum number of possible translatable texts.

Returns
The maximum number of possible translatable texts.

Implements AC.ITranslatable.

◆ GetOwner()

string AC.Document.GetOwner ( )

Gets the name of the translatable text's owner. In the case of speech text, it is the name of the character. In the case of menu element text, it is the name of the menu element.

Returns
The name of the translatable text's owner.

Implements AC.ITranslatable.

◆ GetTranslatableString()

string AC.Document.GetTranslatableString ( int  index)

ITranslatable implementation

Implements AC.ITranslatable.

◆ GetTranslationID()

int AC.Document.GetTranslationID ( int  index)

Gets the translation ID of a given text index.

Parameters
indexThe index of the translatable text
Returns
The translation ID of the text

Implements AC.ITranslatable.

◆ GetTranslationType()

AC_TextType AC.Document.GetTranslationType ( int  index)

Gets the translation type of a given text index.

Parameters
indexThe index of the translatable text
Returns
The translation type of a given text index.

Implements AC.ITranslatable.

◆ HasExistingTranslation()

bool AC.Document.HasExistingTranslation ( int  index)

Checks if a given text index has already been assigned a unique translation ID.

Parameters
indexThe index of the translatable text
Returns
True if the text has been assigned a unique translation ID

Implements AC.ITranslatable.

◆ OwnerIsPlayer()

bool AC.Document.OwnerIsPlayer ( )

Checks if the translatable text's owner is a Player. This is necessary for speech lines, since multiple player prefabs can feasibly share the same line.

Returns
True if the translatable text's owner is a Player.

Implements AC.ITranslatable.

◆ SetTranslationID()

void AC.Document.SetTranslationID ( int  index,
int  lineID 
)

Sets the translation ID of a given text index

Parameters
indexThe index of the translatable text
lineIDThe new translation ID to assign the translatable text

Implements AC.ITranslatable.

Member Data Documentation

◆ carryOnStart

bool AC.Document.carryOnStart = false

If True, the Document will be in the Player's collection when the game begins

◆ ID

int AC.Document.ID

A unique identifier

◆ pages

List<JournalPage> AC.Document.pages = new List<JournalPage>()

A List of JournalPages that make up the contents of the Document

◆ rememberLastOpenPage

bool AC.Document.rememberLastOpenPage = false

If True, the Document will be re-opened at the same page that it was closed at

◆ texture

Texture2D AC.Document.texture

A Texture2D associated with the Document.

◆ title

string AC.Document.title

The title

◆ titleLineID

int AC.Document.titleLineID = -1

The translation ID number of the title, as generated by SpeechManager

Property Documentation

◆ Title

string AC.Document.Title
get

The Document's title. This will set the title to '(Untitled)' if empty.