Пример #1
0
        private void Start()
        {
            // get the components on the object we need ( should not be null due to require component so no need to check )
            agent     = GetComponentInChildren <UnityEngine.AI.NavMeshAgent>();
            character = GetComponent <ThirdPersonCharacter>();

            agent.updateRotation = false;
            agent.updatePosition = true;

            _movingPoints = Camera.main.GetComponent <MovingPoints>();
            _movingPoints.AddToList(this);

            _points = new Queue <Transform>();
        }
Пример #2
0
 void Start()
 {
     _movingPoints = Camera.main.GetComponent <MovingPoints>();
 }