/// <summary> /// Call this in order to initialize the Dialoguer system. /// </summary> public static void Initialize() { events = new DialoguerEvents(); // Initialize DialoguerDataManager DialoguerDataManager.Initialize(); // Subscribe to events DialoguerEventManager.onStarted += events.handler_onStarted; DialoguerEventManager.onEnded += events.handler_onEnded; DialoguerEventManager.onSuddenlyEnded += events.handler_SuddenlyEnded; DialoguerEventManager.onTextPhase += events.handler_TextPhase; DialoguerEventManager.onWindowClose += events.handler_WindowClose; DialoguerEventManager.onWaitStart += events.handler_WaitStart; DialoguerEventManager.onWaitComplete += events.handler_WaitComplete; DialoguerEventManager.onMessageEvent += events.handler_MessageEvent; }
/// <summary> /// Sets Dialoguer's GlobalVariablesState. To be used in combination with the string previously saved with GetGlobalVariablesState /// </summary> /// <param name="globalVariablesXml">Global variables xml.</param> public static void SetGlobalVariablesState(string globalVariablesXml) { DialoguerDataManager.LoadGlobalVariablesState(globalVariablesXml); }
/// <summary> /// Gets Dialoguer's GlobalVariablesState, which can be saved as a string for future use. /// </summary> /// <returns>The global variables state.</returns> public static string GetGlobalVariablesState() { return(DialoguerDataManager.GetGlobalVariablesState()); }
/// <summary> /// Gets the global string. /// </summary> /// <returns>The global string.</returns> /// <param name="stringId">String identifier.</param> public static string GetGlobalString(int stringId) { return(DialoguerDataManager.GetGlobalString(stringId)); }
//Strings /// <summary> /// Sets the global string. /// </summary> /// <param name="stringId">String identifier.</param> /// <param name="stringValue">String value.</param> public static void SetGlobalString(int stringId, string stringValue) { DialoguerDataManager.SetGlobalString(stringId, stringValue); }
/// <summary> /// Gets a global float. /// </summary> /// <returns>The global float.</returns> /// <param name="floatId">Float identifier.</param> public static float GetGlobalFloat(int floatId) { return(DialoguerDataManager.GetGlobalFloat(floatId)); }
//Floats /// <summary> /// Sets a global float. /// </summary> /// <param name="floatId">Float identifier.</param> /// <param name="floatValue">Float value.</param> public static void SetGlobalFloat(int floatId, float floatValue) { DialoguerDataManager.SetGlobalFloat(floatId, floatValue); }
/// <summary> /// Gets a global boolean. /// </summary> /// <returns>Returns the global Boolean specified</returns> /// <param name="booleanId">Boolean identifier.</param> public static bool GetGlobalBoolean(int booleanId) { return(DialoguerDataManager.GetGlobalBoolean(booleanId)); }
//Booleans /// <summary> /// Sets a global boolean. /// </summary> /// <param name="booleanId">Boolean identifier.</param> /// <param name="booleanValue">Boolean value.</param> public static void SetGlobalBoolean(int booleanId, bool booleanValue) { DialoguerDataManager.SetGlobalBoolean(booleanId, booleanValue); }
public static bool isInitialized() { return(DialoguerDataManager.isInitialized()); }