void CollectFriend() { GameObject collectionObj = GameObject.Find("CollectionScript"); if (collectionObj != null) { CityCollectionHandler collectHandler = collectionObj.GetComponent <CityCollectionHandler>(); if (collectHandler != null) { collectHandler.CollectNewFriend(); } } }
bool IsCommuneFull() { bool full = false; GameObject collectionObj = GameObject.Find("CollectionScript"); if (collectionObj != null) { CityCollectionHandler collectHandler = collectionObj.GetComponent <CityCollectionHandler>(); if (collectHandler != null) { return(collectHandler.IsCommuneFull()); } } return(full); }