private IEnumerator SetChangeBallPreview(int idBall) { ballAnimator.gameObject.GetComponent <BBUIView>().HideView(); yield return(new WaitForSeconds(0.3f)); ShowBallPreview_ID(idBall); ballAnimator.gameObject.GetComponent <BBUIView>().ShowView(); if (Config.GetBallActive() == idBall) { btnTryBallPreview.gameObject.SetActive(false); btnActiveBallPreview.gameObject.SetActive(false); } else if (Config.GetInfoBallFromID(idBall).ballType == Config.BALL_TYPE.PREMIUM && Config.GetBuyIAP(Config.IAP_ID.premium_pack)) { btnTryBallPreview.gameObject.SetActive(false); btnActiveBallPreview.gameObject.SetActive(true); btnActiveBallPreview.GetComponent <BBUIView>().ShowView(); } else if (Config.GetInfoBallUnlock(idBall)) { btnTryBallPreview.gameObject.SetActive(false); btnActiveBallPreview.gameObject.SetActive(true); btnActiveBallPreview.GetComponent <BBUIView>().ShowView(); } else { btnActiveBallPreview.gameObject.SetActive(false); btnTryBallPreview.gameObject.SetActive(true); btnTryBallPreview.GetComponent <BBUIView>().ShowView(); } }
public IEnumerator OpenPopup_IEnumerator() { SoundManager.instance.SFX_Win(); btnClose.gameObject.SetActive(false); btnReward.gameObject.SetActive(false); bg.gameObject.SetActive(false); efxBall.gameObject.SetActive(false); efxPopup.gameObject.SetActive(false); animator.gameObject.SetActive(false); txtTitle.gameObject.SetActive(false); yield return(new WaitForSeconds(0.1f)); bg.gameObject.SetActive(true); bg.ShowView(); yield return(new WaitForSeconds(0.5f)); txtTitle.gameObject.SetActive(true); txtTitle.gameObject.GetComponent <BBUIView>().ShowView(); yield return(new WaitForSeconds(0.2f)); animator.gameObject.SetActive(true); animator.GetComponent <BBUIView>().ShowView(); yield return(new WaitForSeconds(0.2f)); efxBall.gameObject.SetActive(true); efxBall.Play(); yield return(new WaitForSeconds(0.1f)); SoundManager.instance.SFX_PhaoHoa(); efxPopup.gameObject.SetActive(true); efxPopup.Play(); if (isVideo) { yield return(new WaitForSeconds(1f)); btnReward.gameObject.SetActive(true); btnReward.GetComponent <BBUIView>().ShowView(); } yield return(new WaitForSeconds(2f)); btnClose.gameObject.SetActive(true); btnClose.GetComponent <BBUIView>().ShowView(); lockGroup.gameObject.SetActive(false); }
public void ShowPopup() { gameObject.SetActive(true); btnBack.GetComponent <BBUIView>().ShowView(); }
public IEnumerator ShowPopup_IEnumerator(int coinReward) { SoundManager.instance.SFX_Win(); bg.gameObject.SetActive(false); btnNoThank.gameObject.SetActive(false); btnReward.gameObject.SetActive(false); btnNextLevel.gameObject.SetActive(false); btnFreeCoin.gameObject.SetActive(false); btnChest.gameObject.SetActive(false); btnDailyReward.gameObject.SetActive(false); btnFreeHeart.gameObject.SetActive(false); btnShopCoin.gameObject.SetActive(false); btnShopSkin.gameObject.SetActive(false); ballAnimator.gameObject.SetActive(false); efxWin.gameObject.SetActive(false); txtLevel.gameObject.SetActive(false); txtCompeted.gameObject.SetActive(false); btnNextBallPreview.gameObject.SetActive(false); btnBackBallPreview.gameObject.SetActive(false); btnTryBallPreview.gameObject.SetActive(false); btnActiveBallPreview.gameObject.SetActive(false); btnShop.gameObject.SetActive(false); btnShopHeart.gameObject.SetActive(false); yield return(new WaitForSeconds(0.1f)); bg.gameObject.SetActive(true); bg.ShowView(); yield return(new WaitForSeconds(0.2f)); txtLevel.gameObject.SetActive(true); txtLevel.gameObject.GetComponent <BBUIView>().ShowView(); txtCompeted.gameObject.SetActive(true); txtCompeted.gameObject.GetComponent <BBUIView>().ShowView(); yield return(new WaitForSeconds(0.5f)); if (Config.GetLevel() > Config.MIN_LEVEL_SHOW_REWARD_BUTTON) { btnReward.gameObject.SetActive(true); btnReward.GetComponent <BBUIView>().ShowView(); } btnFreeCoin.gameObject.SetActive(true); btnFreeCoin.GetComponent <BBUIView>().ShowView(); if (Config.CheckShowStartPack()) { btnChest.gameObject.SetActive(true); btnChest.GetComponent <BBUIView>().ShowView(); } btnFreeHeart.gameObject.SetActive(true); btnFreeHeart.GetComponent <BBUIView>().ShowView(); btnShopSkin.gameObject.SetActive(true); btnShopSkin.GetComponent <BBUIView>().ShowView(); btnShopCoin.gameObject.SetActive(true); btnShopCoin.GetComponent <BBUIView>().ShowView(); btnShopHeart.gameObject.SetActive(true); btnShopHeart.GetComponent <BBUIView>().ShowView(); yield return(new WaitForSeconds(0.2f)); btnShop.gameObject.SetActive(true); btnShop.GetComponent <BBUIView>().ShowView(); yield return(new WaitForSeconds(0.2f)); ballAnimator.gameObject.SetActive(true); ballAnimator.GetComponent <BBUIView>().ShowView(); btnDailyReward.gameObject.SetActive(true); btnDailyReward.GetComponent <BBUIView>().ShowView(); btnNextBallPreview.gameObject.SetActive(true); btnNextBallPreview.GetComponent <BBUIView>().ShowView(); btnBackBallPreview.gameObject.SetActive(true); btnBackBallPreview.GetComponent <BBUIView>().ShowView(); if (Config.GetBallActive() == listIDBallPreviews[indexBallPreview]) { btnTryBallPreview.gameObject.SetActive(false); btnActiveBallPreview.gameObject.SetActive(false); } else if (Config.GetInfoBallFromID(listIDBallPreviews[indexBallPreview]).ballType == Config.BALL_TYPE.PREMIUM && Config.GetBuyIAP(Config.IAP_ID.premium_pack)) { btnTryBallPreview.gameObject.SetActive(false); btnActiveBallPreview.gameObject.SetActive(true); btnActiveBallPreview.GetComponent <BBUIView>().ShowView(); } else if (Config.GetInfoBallUnlock(listIDBallPreviews[indexBallPreview])) { btnTryBallPreview.gameObject.SetActive(false); btnActiveBallPreview.gameObject.SetActive(true); btnActiveBallPreview.GetComponent <BBUIView>().ShowView(); } else { btnActiveBallPreview.gameObject.SetActive(false); btnTryBallPreview.gameObject.SetActive(true); btnTryBallPreview.GetComponent <BBUIView>().ShowView(); } yield return(new WaitForSeconds(0.5f)); SoundManager.instance.SFX_PhaoHoa(); efxWin.gameObject.SetActive(true); efxWin.Play(); yield return(new WaitForSeconds(1f)); lockPopup.SetActive(false); GamePlayManager.Ins.AddCoin(coinReward, posCenter.position, posCoin.position, () => { }); yield return(new WaitForSeconds(3f)); if (Config.GetLevel() <= Config.MIN_LEVEL_SHOW_INTERSTITIAL) { btnNextLevel.gameObject.SetActive(true); btnNextLevel.GetComponent <BBUIView>().ShowView(); } else { btnNoThank.gameObject.SetActive(true); btnNoThank.GetComponent <BBUIView>().ShowView(); } if (Config.currIDBallRescue != -1) { rescuePopup.OpenRescuePopup(); } else if (Config.CheckDailyReward()) { // dailyRewardPopup.OpenPopup(); } }
public IEnumerator ShowPopup_IEnumerator() { SoundManager.instance.SFX_GameOver(); bg.gameObject.SetActive(false); btnReplay.gameObject.SetActive(false); btnSkip.gameObject.SetActive(false); btnFreeCoin.gameObject.SetActive(false); btnChest.gameObject.SetActive(false); btnDailyReward.gameObject.SetActive(false); btnFreeHeart.gameObject.SetActive(false); btnShopCoin.gameObject.SetActive(false); btnShopSkin.gameObject.SetActive(false); ballAnimator.gameObject.SetActive(false); txtLevel.gameObject.SetActive(false); txtFailed.gameObject.SetActive(false); btnNextBallPreview.gameObject.SetActive(false); btnBackBallPreview.gameObject.SetActive(false); btnTryBallPreview.gameObject.SetActive(false); btnActiveBallPreview.gameObject.SetActive(false); btnShop.gameObject.SetActive(false); btnShopHeart.gameObject.SetActive(false); yield return(new WaitForSeconds(0.1f)); bg.gameObject.SetActive(true); bg.ShowView(); yield return(new WaitForSeconds(0.2f)); txtLevel.gameObject.SetActive(true); txtLevel.gameObject.GetComponent <BBUIView>().ShowView(); txtFailed.gameObject.SetActive(true); txtFailed.gameObject.GetComponent <BBUIView>().ShowView(); yield return(new WaitForSeconds(0.5f)); btnFreeCoin.gameObject.SetActive(true); btnFreeCoin.GetComponent <BBUIView>().ShowView(); if (Config.CheckShowStartPack()) { btnChest.gameObject.SetActive(true); btnChest.GetComponent <BBUIView>().ShowView(); } btnFreeHeart.gameObject.SetActive(true); btnFreeHeart.GetComponent <BBUIView>().ShowView(); btnShopSkin.gameObject.SetActive(true); btnShopSkin.GetComponent <BBUIView>().ShowView(); btnShopCoin.gameObject.SetActive(true); btnShopCoin.GetComponent <BBUIView>().ShowView(); btnShopHeart.gameObject.SetActive(true); btnShopHeart.GetComponent <BBUIView>().ShowView(); yield return(new WaitForSeconds(0.2f)); btnShop.gameObject.SetActive(true); btnShop.GetComponent <BBUIView>().ShowView(); yield return(new WaitForSeconds(0.2f)); ballAnimator.gameObject.SetActive(true); ballAnimator.GetComponent <BBUIView>().ShowView(); btnDailyReward.gameObject.SetActive(true); btnDailyReward.GetComponent <BBUIView>().ShowView(); btnNextBallPreview.gameObject.SetActive(true); btnNextBallPreview.GetComponent <BBUIView>().ShowView(); btnBackBallPreview.gameObject.SetActive(true); btnBackBallPreview.GetComponent <BBUIView>().ShowView(); yield return(new WaitForSeconds(0.5f)); btnSkip.gameObject.SetActive(true); btnSkip.GetComponent <BBUIView>().ShowView(); yield return(new WaitForSeconds(1f)); lockPopup.SetActive(false); yield return(new WaitForSeconds(3f)); btnReplay.gameObject.SetActive(true); btnReplay.GetComponent <BBUIView>().ShowView(); if (Config.currIDBallRescue != -1) { rescuePopup.OpenRescuePopup(); } else if (Config.CheckDailyReward()) { // dailyRewardPopup.OpenPopup(); } }
public IEnumerator Start_IEnumerator() { btnPlay.gameObject.SetActive(false); btnShop.gameObject.SetActive(false); btnShopSkin.gameObject.SetActive(false); ballAnimator.gameObject.SetActive(false); btnFreeCoin.gameObject.SetActive(false); btnDailyReward.gameObject.SetActive(false); btnChest.gameObject.SetActive(false); btnShopHeart.gameObject.SetActive(false); btnFreeHeart.gameObject.SetActive(false); btnShopCoin.gameObject.SetActive(false); txtLevel.gameObject.SetActive(false); btnNextBallPreview.gameObject.SetActive(false); btnBackBallPreview.gameObject.SetActive(false); btnTryBallPreview.gameObject.SetActive(false); btnActiveBallPreview.gameObject.SetActive(false); yield return(new WaitForSeconds(0.1f)); txtLevel.gameObject.SetActive(true); txtLevel.gameObject.GetComponent <BBUIView>().ShowView(); yield return(new WaitForSeconds(0.5f)); btnFreeCoin.gameObject.SetActive(true); btnFreeCoin.GetComponent <BBUIView>().ShowView(); if (Config.CheckShowStartPack()) { btnChest.gameObject.SetActive(true); btnChest.GetComponent <BBUIView>().ShowView(); } btnShopCoin.gameObject.SetActive(true); btnShopCoin.GetComponent <BBUIView>().ShowView(); btnShopHeart.gameObject.SetActive(true); btnShopHeart.GetComponent <BBUIView>().ShowView(); btnFreeHeart.gameObject.SetActive(true); btnFreeHeart.GetComponent <BBUIView>().ShowView(); btnShopSkin.gameObject.SetActive(true); btnShopSkin.GetComponent <BBUIView>().ShowView(); yield return(new WaitForSeconds(0.2f)); btnShop.gameObject.SetActive(true); btnShop.GetComponent <BBUIView>().ShowView(); ballAnimator.gameObject.SetActive(true); ballAnimator.GetComponent <BBUIView>().ShowView(); btnDailyReward.gameObject.SetActive(true); btnDailyReward.GetComponent <BBUIView>().ShowView(); btnPlay.gameObject.SetActive(true); btnPlay.GetComponent <BBUIView>().ShowView(); btnNextBallPreview.gameObject.SetActive(true); btnNextBallPreview.GetComponent <BBUIView>().ShowView(); btnBackBallPreview.gameObject.SetActive(true); btnBackBallPreview.GetComponent <BBUIView>().ShowView(); // bổ sung hiện tryball ở đây if (Config.GetBallActive() == listIDBallPreviews[indexBallPreview]) { btnTryBallPreview.gameObject.SetActive(false); btnActiveBallPreview.gameObject.SetActive(false); } else if (Config.GetInfoBallFromID(listIDBallPreviews[indexBallPreview]).ballType == Config.BALL_TYPE.PREMIUM && Config.GetBuyIAP(Config.IAP_ID.premium_pack)) { btnTryBallPreview.gameObject.SetActive(false); btnActiveBallPreview.gameObject.SetActive(true); btnActiveBallPreview.GetComponent <BBUIView>().ShowView(); } else if (Config.GetInfoBallUnlock(listIDBallPreviews[indexBallPreview])) { btnTryBallPreview.gameObject.SetActive(false); btnActiveBallPreview.gameObject.SetActive(true); btnActiveBallPreview.GetComponent <BBUIView>().ShowView(); } else { btnActiveBallPreview.gameObject.SetActive(false); btnTryBallPreview.gameObject.SetActive(true); btnTryBallPreview.GetComponent <BBUIView>().ShowView(); } if (Config.CheckDailyReward()) { OpenDailyRewardPopup(); } }