private GameObject Spawn(GameObject gameObject, Vector3 position) { return(WorkerFactory.GiveMeWorker(position + spawnDirection, Quaternion.identity, allegiance, collectionZone)); //GameObject createdWorker = Instantiate(gameObject, position + spawnDirection, Quaternion.identity); //createdWorker.GetComponent<Renderer>().material = myMaterial; //Worker workerObject = createdWorker.GetComponent<Worker>(); //workerObject.SetHomeZone(collectionZone); //workerObject.SetAllegiance(allegiance); //workerObject.SetGameResources(gameResources); //return createdWorker; }