public void FSMEvent(string eventName, string objectName, string fsmName) { bool all = string.Equals(objectName, "all", StringComparison.OrdinalIgnoreCase); var subject = all ? null : GameObject.Find(objectName); if (all) { DialogueSystemPlayMakerTools.SendEventToAllFSMs(eventName, fsmName); } else if (subject != null) { DialogueSystemPlayMakerTools.SendEventToFSMs(subject.transform, eventName, fsmName); } }
private void Sync() { if (dialogueSystemVariable == null || string.IsNullOrEmpty(dialogueSystemVariable.Value)) { LogWarning(DialogueDebug.Prefix + ": Dialogue System Variable isn't assigned or is blank."); } else if (playMakerVariable == null) { LogWarning(DialogueDebug.Prefix + ": PlayMaker Variable isn't assigned or is blank."); } else { if (toDialogueSystem != null && toDialogueSystem.Value == true) { DialogueLua.SetVariable(dialogueSystemVariable.Value, DialogueSystemPlayMakerTools.ArrayToString(playMakerVariable.Values)); } else { playMakerVariable.Values = DialogueSystemPlayMakerTools.StringToArray(DialogueLua.GetVariable(dialogueSystemVariable.Value).AsString, VariableType.Vector3); } } }
private void Sync() { if (dialogueSystemVariable == null || string.IsNullOrEmpty(dialogueSystemVariable.Value)) { LogWarning(DialogueDebug.Prefix + ": Dialogue System Variable isn't assigned or is blank."); } else if (playMakerVariable == null) { LogWarning(DialogueDebug.Prefix + ": PlayMaker Variable isn't assigned or is blank."); } else { if (toDialogueSystem != null && toDialogueSystem.Value == true) { var gameObjectName = (playMakerVariable.Value != null) ? playMakerVariable.Value.name : "null-object"; DialogueLua.SetVariable(dialogueSystemVariable.Value, gameObjectName); } else { var gameObjectName = DialogueLua.GetVariable(dialogueSystemVariable.Value).AsString; playMakerVariable.Value = DialogueSystemPlayMakerTools.FindOrLoadGameObject(gameObjectName, searchSceneObjects.Value, searchPrefabs.Value); } } }
public void SetFsmInt(string name, double value) { DialogueSystemPlayMakerTools.SetFsmInt(name, (int)value); }
public string GetFsmString(string name) { return(DialogueSystemPlayMakerTools.GetFsmString(name)); }
public bool GetFsmBool(string name) { return(DialogueSystemPlayMakerTools.GetFsmBool(name)); }
public double GetFsmInt(string name) { return(DialogueSystemPlayMakerTools.GetFsmInt(name)); }
public void SetFsmString(string name, string value) { DialogueSystemPlayMakerTools.SetFsmString(name, value); }
public void SetFsmBool(string name, bool value) { DialogueSystemPlayMakerTools.SetFsmBool(name, value); }