private IEnumerator StageProgressAnimation() { while (true) { if (currentProgress < targetProgress) { float delta = Mathf.Clamp(Time.unscaledDeltaTime, 0, 0.04f) * ProgressAnimationSpeed; currentProgress += delta; float nextFillAmount = FillStart + FillLength * (currentProgress - Mathf.Floor(currentProgress)); if (stageProgressFillImage.fillAmount > nextFillAmount) { GameManager.nextSlotsIsUpgradeSlots = true; if (!UIManager.PanelWhetherShowAnyone() && GameManager.WillShowSlots <= 0) { UIManager.ShowPopPanelByType(UI_Panel.UI_PopPanel.SlotsPanel); } else { GameManager.WillShowSlots++; } SetStageInfo(); GameManager.Instance.SpawnAGiftBall(); } stageProgressFillImage.fillAmount = nextFillAmount; } yield return(null); } }
private void OnProp2ButtonClick() { if (AnimationAutoEnd.IsAnimation) { return; } GameManager.PlayButtonClickSound(); if (hasProp2) { if (GameManager.UseProp2()) { GameManager.AddProp2Num(-1); } } else { int needCoin = GameManager.GetProp2NeedCoinNum(); if (GameManager.GetCoin() >= needCoin) { GameManager.WillBuyProp = Reward.Prop2; UIManager.ShowPopPanelByType(UI_Panel.UI_PopPanel.BuyPropPanel); } else { GameManager.PlayRV(OnAdBuyProp2Callback, 2, "获得道具2"); } } }
private void OnSettingButtonClick() { GameManager.PlayButtonClickSound(); if (AnimationAutoEnd.IsAnimation) { return; } UIManager.ShowPopPanelByType(UI_Panel.UI_PopPanel.SettingPanel); }
protected override void OnEndShow() { rewardTargetTransform.Add(Reward.Prop1, propButton1.transform); rewardTargetTransform.Add(Reward.Prop2, propButton2.transform); rewardTargetTransform.Add(Reward.Cash, cashButton.transform); rewardTargetTransform.Add(Reward.Coin, coinButton.transform); rewardTargetTransform.Add(Reward.Energy, MainController.Instance.energyText.transform); if (!GameManager.CheckWhetherGuideHowtoplay()) { MainController.Instance.SetCurrentBallState(false); UIManager.ShowPopPanelByType(UI_Panel.UI_PopPanel.GuidePanel); GameManager.SetHasGuideHowtoplay(); } }
private void OnCloseIVCallback() { UIManager.ClosePopPanel(this); if (GameManager.WillShowGift > 0) { GameManager.WillShowGift--; UIManager.ShowPopPanelByType(UI_Panel.UI_PopPanel.GiftPanel); } else if (GameManager.WillShowSlots > 0) { GameManager.WillShowSlots--; UIManager.ShowPopPanelByType(UI_Panel.UI_PopPanel.SlotsPanel); } }
protected override void OnEndClose() { if (needAd) { StopCoroutine(nothanksDelay); } if (GameManager.WillShowGift > 0) { GameManager.WillShowGift--; UIManager.ShowPopPanelByType(UI_Panel.UI_PopPanel.GiftPanel); } else if (GameManager.WillShowSlots > 0) { GameManager.WillShowSlots--; UIManager.ShowPopPanelByType(UI_Panel.UI_PopPanel.SlotsPanel); } }
protected override void OnEndClose() { UIManager.ShowPopPanelByType(UI_Panel.UI_PopPanel.GiftPanel); }