public IEnumerator WaitForSound() { AsyncOperation loadingOperation = SceneManager.LoadSceneAsync("StoreScene"); yield return(new WaitUntil(() => loadingOperation.isDone)); StoreManager.ChangeSell(); yield return(new WaitUntil(() => sound.isPlaying == false)); Destroy(stageCanvas); }
public void TryingBuy() { thingsName = buyName.GetComponent <Text>().text; thingsPrice = int.Parse(buyPrice.GetComponent <Text>().text); if (GameManager.coin >= thingsPrice) { GameManager.coin -= thingsPrice; Store.Things[thingsName] = true; StoreManager.ChangeSell(); } else { // 구매할 수 없다는 내용이 나오면 좋을 듯 } buyCanvas.SetActive(false); }