void Awake() { mm = FindObjectOfType <MouseManager>(); agent = this.GetComponent <NavMeshAgent>(); anim = this.GetComponent <Animator>(); woodHarvesting = this.GetComponent <WoodHarvesting>(); state = State.Idle; CreateWorker(); }
public bool workersPresent; // hacky fix -- we get a null reference exception if we don't have a worker selected void Awake() { uiManager = FindObjectOfType <UIManager>(); woodHarvesting = FindObjectOfType <WoodHarvesting>(); }