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

Public Member Functions

 ObjectiveState (int _ID, string _label, ObjectiveStateType _stateType)
 
 ObjectiveState (int[] idArray)
 
string GetLabel (int languageNumber=0)
 Gets the states's label text in a given language More...
 
string GetDescription (int languageNumber=0)
 Gets the states's description text in a given language More...
 
bool DisplayTypeMatches (ObjectiveDisplayType displayType)
 Checks if the state matches a given display type, as used by InventoryBox elements More...
 
void ShowGUI (string apiPrefix)
 
string GetTranslatableString (int index)
 Gets the text to be translated, given its index. More...
 
int GetTranslationID (int index)
 Gets the translation ID of a given text index. More...
 
AC_TextType GetTranslationType (int index)
 Gets the translation type of a given text index. More...
 
void UpdateTranslatableString (int index, string updatedText)
 
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 (int index)
 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 (int index)
 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...
 
bool CanTranslate (int index)
 Checks if a given text index can and should be translated. More...
 

Public Attributes

int ID
 
int labelLineID = -1
 
string description
 
int descriptionLineID = -1
 
ObjectiveStateType stateType
 

Protected Attributes

string label
 

Properties

string Label [get, set]
 

Detailed Description

Stores data for a state that an Objective can take.

Member Function Documentation

◆ CanTranslate()

bool AC.ObjectiveState.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.

◆ DisplayTypeMatches()

bool AC.ObjectiveState.DisplayTypeMatches ( ObjectiveDisplayType  displayType)

Checks if the state matches a given display type, as used by InventoryBox elements

Parameters
displayTypeThe display type
Returns
True if the state matches

◆ GetDescription()

string AC.ObjectiveState.GetDescription ( int  languageNumber = 0)

Gets the states's description text in a given language

Parameters
languageNumberThe language index, where 0 = the game's default language
Returns
The description text

◆ GetLabel()

string AC.ObjectiveState.GetLabel ( int  languageNumber = 0)

Gets the states's label text in a given language

Parameters
languageNumberThe language index, where 0 = the game's default language
Returns
The label text

◆ GetNumTranslatables()

int AC.ObjectiveState.GetNumTranslatables ( )

Gets the maximum number of possible translatable texts.

Returns
The maximum number of possible translatable texts.

Implements AC.ITranslatable.

◆ GetOwner()

string AC.ObjectiveState.GetOwner ( int  index)

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.

Parameters
indexThe index of the translatable text
Returns
The name of the translatable text's owner.

Implements AC.ITranslatable.

◆ GetTranslatableString()

string AC.ObjectiveState.GetTranslatableString ( int  index)

Gets the text to be translated, given its index.

Parameters
indexThe index of the translatable text
Returns
The text to be translated

Implements AC.ITranslatable.

◆ GetTranslationID()

int AC.ObjectiveState.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.ObjectiveState.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.ObjectiveState.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.ObjectiveState.OwnerIsPlayer ( int  index)

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.

Parameters
indexThe index of the translatable text
Returns
True if the translatable text's owner is a Player.

Implements AC.ITranslatable.

◆ SetTranslationID()

void AC.ObjectiveState.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

◆ description

string AC.ObjectiveState.description

An description for the state

◆ descriptionLineID

int AC.ObjectiveState.descriptionLineID = -1

The translation ID for the description text, generated by the Speech Manager

◆ ID

int AC.ObjectiveState.ID

A unique identifier

◆ labelLineID

int AC.ObjectiveState.labelLineID = -1

The translation ID for the label text, generated by the Speech Manager

◆ stateType

ObjectiveStateType AC.ObjectiveState.stateType

The type of state it is (Active, Complete, Fail)

Property Documentation

◆ Label

string AC.ObjectiveState.Label
getset

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