Exemple #1
0
    void AnimatePath(List <string> path)
    {
        CubeController demo = GetComponent <CubeController>();

        if (demo == null)
        {
            Debug.LogWarning("No CubeController component. Cannot animate!");
            return; // not animating
        }

        demo.ClearQueue();
        foreach (string word in path)
        {
            demo.QueueCommand(word, 100);
        }
    }
Exemple #2
0
    public void ParseRecipe(string s)
    {
        if (_controller)
        {
            _controller.ClearQueue();

            char[]   delimiterChars = { ' ' };
            string[] words          = s.Split(delimiterChars);
            for (int w = 0; w < words.Length; w++)
            {
                string word = words[w];
                _controller.QueueCommand(word, turnRate);
            }
        }
        else
        {
            sequence = s;
        }
    }