PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge Class Reference

This component synchronizes Adventure Creator data with Dialogue System data. More...

Inheritance diagram for PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge:
Collaboration diagram for PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge:

Classes

class  SyncSettings
 

Public Member Functions

virtual void Start ()
 
virtual void OnConversationStart (Transform actor)
 Prepares to run a conversation by freezing AC and syncing data to Lua. More...
 
virtual void OnConversationEnd (Transform actor)
 At the end of a conversation, unfreezes AC and syncs Lua back to AC. More...
 
virtual void SetConversationGameState ()
 Sets GameState to DialogOptions if specified in the properties. More...
 
virtual void UnsetConversationGameState ()
 Restores the previous GameState if necessary. More...
 
void SetGameStateToCutscene ()
 Sets AC's GameState to DialogOptions. More...
 
void RestorePreviousGameState ()
 
void DisableACCameraControl ()
 
void EnableACCameraControl ()
 
void IdleACCameraControl ()
 
void SetConversationCursor ()
 Sets the conversation cursor. More...
 
void RestorePreviousCursor ()
 Restores the previous cursor. More...
 
virtual void SyncAdventureCreatorToLua ()
 Syncs the AC data to Lua. More...
 
virtual void SyncLuaToAdventureCreator ()
 Syncs Lua back to AC data. More...
 
void SyncVariablesToLua ()
 
void SyncLuaToVariables ()
 
void SyncInventoryToLua ()
 Syncs AC's inventory to Lua. More...
 
void SyncLuaToInventory ()
 Syncs Lua to AC's inventory. More...
 

Static Public Member Functions

static void SaveDialogueSystemToGlobalVariable ()
 Saves the Dialogue System state to a dedicated AC global variable. More...
 
static void LoadDialogueSystemFromGlobalVariable ()
 Loads the Dialogue System state from a dedicated AC global variable. More...
 
static void UpdateSettingsFromAC ()
 

Public Attributes

UseDialogState useDialogState = UseDialogState.IfPlayerInvolved
 The AC GameState to use when in conversations. More...
 
UseDialogState takeCameraControl = UseDialogState.IfPlayerInvolved
 Specifies when conversations should take camera control. More...
 
float maxTimeToWaitForCameraStop = 10f
 The max time to wait for the camera stop if takeCameraControl is AfterStopIfPlayerInvolved. More...
 
SyncSettings syncSettings = new SyncSettings()
 
bool includeSimStatus = false
 Set true to include dialogue entry status (offered and/or spoken) in save data. More...
 
bool prependGlobalVariables = false
 Set true to prepend 'global_' in front of global AC variables in Dialogue System's Variable[] table. More...
 
bool saveToGlobalVariableOnConversationEnd = false
 Set true to save the Lua environment to the AC global variable when conversations end. More...
 
bool saveToGlobalVariableOnLevelChange = false
 Set true to save the Lua environment to the AC global variable when changing levels. More...
 
bool rerunScriptAfterCutscenes = false
 Set true to resolve race conditions between AC() sequencer command and Lua Script on subsequent dialogue entry. More...
 
bool useAdventureCreatorLanguage = true
 Set the Dialogue System's localization according to Adventure Creator's current language. More...
 
bool useAdventureCreatorSubtitlesSetting = false
 Set the Dialogue System's localization according to Adventure Creator's current subtitle settings. More...
 
bool overrideBridge = false
 
UseDialogState overrideUseDialogState = UseDialogState.IfPlayerInvolved
 
UseDialogState overrideTakeCameraControl = UseDialogState.IfPlayerInvolved
 

Static Public Attributes

static string DialogueSystemGlobalVariableName = "DialogueSystemEnvironment"
 The name of the AC global variable used to store Dialogue System state. More...
 

Protected Member Functions

void UpdateAdventureCreatorItem (string itemName, int itemID, int newCount)
 Updates the count of an item in AC's inventory. More...
 

Properties

bool skipSyncToLua [get, set]
 Set this true to skip the next sync to Lua. More...
 
UseDialogStateactiveUseDialogState [get]
 
UseDialogStateactiveTakeCameraControl [get]
 

Detailed Description

This component synchronizes Adventure Creator data with Dialogue System data.

Add it to your Dialogue Manager object. It synchronizes AC's variables with the Dialogue System's Variable[] Lua table, and AC's inventory with the Dialogue System's Item[] Lua table.

It also provides methods to save and load the Dialogue System's state to an AC global variable. You can call these methods when saving and loading games in AC.

Member Function Documentation

◆ DisableACCameraControl()

void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.DisableACCameraControl ( )

◆ EnableACCameraControl()

void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.EnableACCameraControl ( )

◆ IdleACCameraControl()

void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.IdleACCameraControl ( )

◆ LoadDialogueSystemFromGlobalVariable()

static void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.LoadDialogueSystemFromGlobalVariable ( )
static

Loads the Dialogue System state from a dedicated AC global variable.

◆ OnConversationEnd()

virtual void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.OnConversationEnd ( Transform  actor)
virtual

At the end of a conversation, unfreezes AC and syncs Lua back to AC.

Parameters
actorActor.

◆ OnConversationStart()

virtual void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.OnConversationStart ( Transform  actor)
virtual

Prepares to run a conversation by freezing AC and syncing data to Lua.

Parameters
actorThe other actor.

◆ RestorePreviousCursor()

void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.RestorePreviousCursor ( )

Restores the previous cursor.

◆ RestorePreviousGameState()

void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.RestorePreviousGameState ( )

◆ SaveDialogueSystemToGlobalVariable()

static void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SaveDialogueSystemToGlobalVariable ( )
static

Saves the Dialogue System state to a dedicated AC global variable.

This method will create the global variable if it doesn't already exist.

◆ SetConversationCursor()

void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SetConversationCursor ( )

Sets the conversation cursor.

◆ SetConversationGameState()

virtual void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SetConversationGameState ( )
virtual

Sets GameState to DialogOptions if specified in the properties.

◆ SetGameStateToCutscene()

void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SetGameStateToCutscene ( )

Sets AC's GameState to DialogOptions.

◆ Start()

virtual void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.Start ( )
virtual

◆ SyncAdventureCreatorToLua()

virtual void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SyncAdventureCreatorToLua ( )
virtual

Syncs the AC data to Lua.

◆ SyncInventoryToLua()

void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SyncInventoryToLua ( )

Syncs AC's inventory to Lua.

◆ SyncLuaToAdventureCreator()

virtual void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SyncLuaToAdventureCreator ( )
virtual

Syncs Lua back to AC data.

◆ SyncLuaToInventory()

void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SyncLuaToInventory ( )

Syncs Lua to AC's inventory.

◆ SyncLuaToVariables()

void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SyncLuaToVariables ( )

◆ SyncVariablesToLua()

void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.SyncVariablesToLua ( )

◆ UnsetConversationGameState()

virtual void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.UnsetConversationGameState ( )
virtual

Restores the previous GameState if necessary.

◆ UpdateAdventureCreatorItem()

void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.UpdateAdventureCreatorItem ( string  itemName,
int  itemID,
int  newCount 
)
protected

Updates the count of an item in AC's inventory.

Parameters
itemNameItem name.
itemIDItem ID.
newCountNew count.

◆ UpdateSettingsFromAC()

static void PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.UpdateSettingsFromAC ( )
static

Member Data Documentation

◆ DialogueSystemGlobalVariableName

string PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.DialogueSystemGlobalVariableName = "DialogueSystemEnvironment"
static

The name of the AC global variable used to store Dialogue System state.

◆ includeSimStatus

bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.includeSimStatus = false

Set true to include dialogue entry status (offered and/or spoken) in save data.

◆ maxTimeToWaitForCameraStop

float PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.maxTimeToWaitForCameraStop = 10f

The max time to wait for the camera stop if takeCameraControl is AfterStopIfPlayerInvolved.

◆ overrideBridge

bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.overrideBridge = false

◆ overrideTakeCameraControl

UseDialogState PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.overrideTakeCameraControl = UseDialogState.IfPlayerInvolved

◆ overrideUseDialogState

UseDialogState PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.overrideUseDialogState = UseDialogState.IfPlayerInvolved

◆ prependGlobalVariables

bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.prependGlobalVariables = false

Set true to prepend 'global_' in front of global AC variables in Dialogue System's Variable[] table.

◆ rerunScriptAfterCutscenes

bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.rerunScriptAfterCutscenes = false

Set true to resolve race conditions between AC() sequencer command and Lua Script on subsequent dialogue entry.

◆ saveToGlobalVariableOnConversationEnd

bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.saveToGlobalVariableOnConversationEnd = false

Set true to save the Lua environment to the AC global variable when conversations end.

◆ saveToGlobalVariableOnLevelChange

bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.saveToGlobalVariableOnLevelChange = false

Set true to save the Lua environment to the AC global variable when changing levels.

◆ syncSettings

SyncSettings PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.syncSettings = new SyncSettings()

◆ takeCameraControl

UseDialogState PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.takeCameraControl = UseDialogState.IfPlayerInvolved

Specifies when conversations should take camera control.

◆ useAdventureCreatorLanguage

bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.useAdventureCreatorLanguage = true

Set the Dialogue System's localization according to Adventure Creator's current language.

◆ useAdventureCreatorSubtitlesSetting

bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.useAdventureCreatorSubtitlesSetting = false

Set the Dialogue System's localization according to Adventure Creator's current subtitle settings.

◆ useDialogState

UseDialogState PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.useDialogState = UseDialogState.IfPlayerInvolved

The AC GameState to use when in conversations.

Property Documentation

◆ activeTakeCameraControl

UseDialogState? PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.activeTakeCameraControl
get

◆ activeUseDialogState

UseDialogState? PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.activeUseDialogState
get

◆ skipSyncToLua

bool PixelCrushers.DialogueSystem.AdventureCreator.AdventureCreatorBridge.skipSyncToLua
getset

Set this true to skip the next sync to Lua.

The Conversation action sets this true because it manually syncs to Lua before the conversation starts.

true to skip sync to lua; otherwise, false.


The documentation for this class was generated from the following file: