private void Start() { _currentPlantStage = 0; _beenPlaced = false; _health = 15; _seedSpotManager = GameObject.FindGameObjectWithTag("SeedSpotManager").GetComponent <SeedSpotManager>(); }
private void Start() { _animator = GetComponent <Animator>(); _seedSpotManager = GameObject.FindGameObjectWithTag("SeedSpotManager").GetComponent <SeedSpotManager>(); _agent = GetComponent <NavMeshAgent>(); _agent.SetDestination(_seedSpotManager.GetClosestActiveSeedSpot(transform.position)); _animator.SetTrigger("walk"); }