// Start is called before the first frame update void Start() { startRotation = new Quaternion(); endRotation = new Quaternion(); agent = GetComponent <NavMeshAgent>(); grimeAffector = GetComponent <GrimeAffector>(); //agent.updateRotation = false; if (!player) { player = GameObject.FindGameObjectWithTag("Player").transform; } if (!goal) { goal = GameObject.FindGameObjectWithTag("DogHouse").transform; } if (!foodBowl) { foodBowl = GameObject.FindGameObjectWithTag("FoodBowl").transform; } if (patrolPoints.Length <= 0) { patrolPoints = new Vector3[1]; patrolPoints[0] = transform.position; } }
// Start is called before the first frame update void Start() { playerMovement = GetComponent <PlayerMovement>(); grimeAffector = GetComponent <GrimeAffector>(); if (endRadius == 0) { endRadius = grimeAffector.GetRadius(); } grimeAffector.SetRadius(startRadius); }