Ejemplo n.º 1
0
        void StopPlaytest_Internal(bool force = false)
        {
            if (!IsDocked() || force)
            {
                if (dialogue != null)
                {
                    dialogue.Stop();
                }
                this.StopAllCoroutines();
                validDialogue = false;

                Close();
            }
        }
Ejemplo n.º 2
0
        public void TestGettingCurrentNodeName()
        {
            dialogue.LoadFile("../Unity/Assets/Yarn Spinner/Examples/Demo Assets/Space.json");

            // dialogue should not be running yet
            Assert.IsNull(dialogue.currentNode);

            foreach (var result in dialogue.Run("Sally"))
            {
                // Should now be in the node we requested
                Assert.AreEqual(dialogue.currentNode, "Sally");
                // Stop immediately
                dialogue.Stop();
            }

            // Current node should now be null
            Assert.IsNull(dialogue.currentNode);
        }