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<ThirdPersonCharacter>();
            m_Rigidbody = GetComponent<Rigidbody>();
            m_Player = GetComponent<Player>();

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

            m_TargetPosition = transform.position;
        }
Beispiel #2
0
        private bool m_IsShowingGameOver;                       // To make sure the gameover event is only called once.


        private void Awake ()
        {
            // Find the Player component from the player's transform.
            m_Player = m_PlayerTransform.GetComponent<Player> ();
        }