public override void Execute()
        {
            switch (scope)
            {
            case DialoguePropertyScope.Local:
                if (relative)
                {
                    int oldValue = DialogueGraph.localProperties.Get <int>(key);
                    DialogueGraph.localProperties.Set(key, oldValue + value);
                }
                else
                {
                    DialogueGraph.localProperties.Set(key, value);
                }
                break;

            case DialoguePropertyScope.Global:
                if (relative)
                {
                    int oldValue = DialogueManager.Instance.globalProperties.Get <int>(key);
                    DialogueManager.Instance.globalProperties.Set(key, oldValue + value);
                }
                else
                {
                    DialogueManager.Instance.globalProperties.Set(key, value);
                }
                break;
            }

            DialogueGraph.ExecuteNextNode();
        }
Пример #2
0
 public override void Execute()
 {
     if (Compare())
     {
         DialogueGraph.ExecuteNextNode();
     }
     else
     {
         DialogueGraph.ExecuteNextNode(0, "elseNext");
     }
 }
Пример #3
0
        public override void Execute()
        {
            switch (scope)
            {
            case DialoguePropertyScope.Local:
                DialogueGraph.localProperties.Set(key, value);
                break;

            case DialoguePropertyScope.Global:
                DialogueManager.Instance.globalProperties.Set(key, value);
                break;
            }

            DialogueGraph.ExecuteNextNode();
        }