Adventure Creator 1.84.3
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2024
Loading...
Searching...
No Matches
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.
string GetDescription (int languageNumber=0)
 Gets the states's description text in a given language.
bool DisplayTypeMatches (ObjectiveDisplayType displayType)
 Checks if the state matches a given display type, as used by InventoryBox elements.
string GetStateTypeText (int languageNumber=0)
void ShowGUI (Objective objective, string apiPrefix, System.Action< ActionListAsset > showALAEditor)
string GetTranslatableString (int index)
 Gets the text to be translated, given its index.
int GetTranslationID (int index)
 Gets the translation ID of a given text index.
AC_TextType GetTranslationType (int index)
 Gets the translation type of a given text index.
void UpdateTranslatableString (int index, string updatedText)
int GetNumTranslatables ()
 Gets the maximum number of possible translatable texts.
bool HasExistingTranslation (int index)
 Checks if a given text index has already been assigned a unique translation ID.
void SetTranslationID (int index, int _lineID)
 Sets the translation ID of a given text index.
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.
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.
bool CanTranslate (int index)
 Checks if a given text index can and should be translated.

Public Attributes

int ID
int labelLineID = -1
string description
int descriptionLineID = -1
ObjectiveStateType stateType
ActionListAsset actionListOnEnter = null
bool autoStartSubObjectives = false
Texture2D texture

Protected Attributes

string label

Properties

string Label [get, set]
int LinkedCategoryID [get, set]
int AutoStateIDOnAllSubObsComplete [get, set]
int AutoStateIDOnAnySubObsComplete [get, set]
int AutoStateIDOnAllSubObsFail [get, set]
int AutoStateIDOnAnySubObsFail [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.

◆ UpdateTranslatableString()

void AC.ObjectiveState.UpdateTranslatableString ( int index,
string updatedText )

Implements AC.ITranslatable.

Member Data Documentation

◆ actionListOnEnter

ActionListAsset AC.ObjectiveState.actionListOnEnter = null

An ActionList to run when the state is entered

◆ autoStartSubObjectives

bool AC.ObjectiveState.autoStartSubObjectives = false

If True, all Objectives in the sub-category will begin automatically when this state is entered

◆ 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)

◆ texture

Texture2D AC.ObjectiveState.texture

A texture that can override the Objective's main texture when this state is active

Property Documentation

◆ AutoStateIDOnAllSubObsComplete

int AC.ObjectiveState.AutoStateIDOnAllSubObsComplete
getset

The state ID to automatically switch to when all sub-objectives are complete

◆ AutoStateIDOnAllSubObsFail

int AC.ObjectiveState.AutoStateIDOnAllSubObsFail
getset

The state ID to automatically switch to when all sub-objectives are failed

◆ AutoStateIDOnAnySubObsComplete

int AC.ObjectiveState.AutoStateIDOnAnySubObsComplete
getset

The state ID to automatically switch to when any sub-objective is complete

◆ AutoStateIDOnAnySubObsFail

int AC.ObjectiveState.AutoStateIDOnAnySubObsFail
getset

The state ID to automatically switch to when any sub-objectives are failed

◆ Label

string AC.ObjectiveState.Label
getset

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

◆ LinkedCategoryID

int AC.ObjectiveState.LinkedCategoryID
getset

The cateogry ID for the state's sub-objectives, if >= 0