Ejemplo n.º 1
0
    public void SetPath(NextPath path)
    {
        Vector3 pos = new Vector3();

        pos = GetPosition(path);
        //	SetIndex ();
        NewPath = Paths[(int)Random.Range(0.1f, 1.9f)];
        NewPath = Instantiate(NewPath);
        NewPath.transform.position = pos;
        StartCoroutine(Coroutine());
    }
Ejemplo n.º 2
0
    //public void SetIndex()
    //{
    //    CurrentIndex++;
    //    if (CurrentIndex == Paths.Length)
    //    {
    //        CurrentIndex = 0;
    //    }
    //}

    public Vector3 GetPosition(NextPath path)
    {
        return(path.pivot.transform.position);
    }