Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 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);
         }
     }
 }
Ejemplo n.º 3
0
 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);
         }
     }
 }
Ejemplo n.º 4
0
 public void SetFsmInt(string name, double value)
 {
     DialogueSystemPlayMakerTools.SetFsmInt(name, (int)value);
 }
Ejemplo n.º 5
0
 public string GetFsmString(string name)
 {
     return(DialogueSystemPlayMakerTools.GetFsmString(name));
 }
Ejemplo n.º 6
0
 public bool GetFsmBool(string name)
 {
     return(DialogueSystemPlayMakerTools.GetFsmBool(name));
 }
Ejemplo n.º 7
0
 public double GetFsmInt(string name)
 {
     return(DialogueSystemPlayMakerTools.GetFsmInt(name));
 }
Ejemplo n.º 8
0
 public void SetFsmString(string name, string value)
 {
     DialogueSystemPlayMakerTools.SetFsmString(name, value);
 }
Ejemplo n.º 9
0
 public void SetFsmBool(string name, bool value)
 {
     DialogueSystemPlayMakerTools.SetFsmBool(name, value);
 }