Ejemplo n.º 1
0
        public Transform target;                                    // target to aim for


        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 <MyThirdPersonCharacter>();

            agent.updateRotation = false;
            agent.updatePosition = true;
        }
        private void Start()
        {
            // Set the color chosen by the player.
            // Box001 represents the object that has the MeshRenderer for the character.
            transform.FindChild("Box001").GetComponent <SkinnedMeshRenderer>().material.color = color;
            coins = 0;

            // The player is not supposed to appear until the countdown ends, lets remove it out of sight.
            transform.position = new Vector3(1000, 1000, 1000);

            // get the third person character ( this should never be null due to require component )
            m_Character = GetComponent <MyThirdPersonCharacter>();
        }