private void Awake() { myCollectorMovement = GetComponentInParent <CollectorMovement>(); myNavMeshAgent = GetComponentInParent <NavMeshAgent>(); myGameManager = FindObjectOfType <GameManager>(); myDepotFrontGate = FindObjectOfType <DepotFrontGate>(); myWasteCentreFrontGate = FindObjectOfType <WasteCentreFrontGate>(); myAudioManager = FindObjectOfType <AudioManager>(); }
// Start is called before the first frame update void Start() { myDepotLots = GetComponentsInChildren <DepotLot>(); myDepotFrontGate = GetComponentInChildren <DepotFrontGate>(); depotFrontGateTrans = myDepotFrontGate.transform; }