Пример #1
0
    void Update()
    {
        UpdateKids();
        float positionX = 0f;

        for (int i = 0; i < bugSequence.Count; i++)
        {
            // Position the arrow
            arrowChildren [i].transform.localPosition = new Vector3(positionX, 0f, 0f);

            // Update its direction
            ArrowScript arrowScript = arrowChildren[i].GetComponent <ArrowScript>();
            arrowScript.Direction(bugSequence [i]);

            if (i < playerSequence.Count)
            {
                highlightChildren [i].transform.localPosition = new Vector3(positionX, 0f, 0f);
            }

            positionX += 1f;
        }
    }