private void Start() { currentState = State.SLEEP; autoIntensity = FindObjectOfType <AutoIntensity>(); animator = GetComponent <Animator>(); agent = GetComponent <NavMeshAgent>(); }
private void Start() { autoIntensity = FindObjectOfType <AutoIntensity>(); rigidBody = GetComponent <Rigidbody>(); rigidBody.freezeRotation = true; audioSource = GetComponent <AudioSource>(); }
// Use this for initialization void Start() { GetComponent <Animator>().runtimeAnimatorController = Resources.Load("Animators/" + plant.GetName()) as RuntimeAnimatorController; theSun = GameObject.FindGameObjectWithTag("TheSun").GetComponent <AutoIntensity>(); }
private void Start() { autoIntensity = FindObjectOfType <AutoIntensity>(); enemyController = FindObjectOfType <EnemyController>(); }