Пример #1
0
        // Use this for initialization
        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<NavMeshAgent>();
            character = GetComponent<UnityStandardAssets.Characters.ThirdPerson.ThirdPersonCharacter>();

            agent.updateRotation = false;
            agent.updatePosition = true;
        }
Пример #2
0
        public Transform target; // target to aim for

        // Use this for initialization
        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 <NavMeshAgent>();
            character = GetComponent <UnityStandardAssets.Characters.ThirdPerson.ThirdPersonCharacter>();

            agent.updateRotation = false;
            agent.updatePosition = true;
        }
Пример #3
0
 private void Start()
 {
     character = GetComponent<UnityStandardAssets.Characters.ThirdPerson.ThirdPersonCharacter>();
 }