void AnturaEnterScene()
        {
            List <Vector3> AnturaPath = new List <Vector3>();

            AnturaPath.Add(ArrayTrees[2].transform.position + Vector3.forward * 3);
            AnturaPath.Add(ArrayTrees[6].transform.position + Vector3.forward * 3);
            AnturaPath.Add(ArrayTrees[6].transform.position + Vector3.forward * 3 + Vector3.left * 3);

            //AnturaPath.Add(ArrayTrees[0].transform.position + Vector3.back * 3);
            AnturaPath.Add(ArrayTrees[1].transform.position + Vector3.forward * 3);

            AnturaPath.Add(transform.position + Vector3.left * 40);

            Vector3[] aAnturaPath = AnturaPath.ToArray();

            AnturaAnimationController anturaAC = Antura.GetComponent <AnturaAnimationController>();

            anturaAC.IsAngry = true;
            //anturaAC.IsSad = true;

            anturaAC.State = AnturaAnimationStates.walking;

            Antura.transform.DOPath(aAnturaPath, 10, PathType.CatmullRom).OnWaypointChange(delegate(int wayPoint) {
                Antura.transform.DOLookAt(aAnturaPath[wayPoint], 0.5f);
            });
        }
Пример #2
0
        void AnturaEnterScene()
        {
            var path = anturaPaths.GetRandom();

            Antura.FollowPath(path);
        }