【测试】广告播放前暂停游戏

iOS_release
zhangaotian 2024-07-04 18:53:45 +08:00
parent de8b083cd2
commit 30a963b394
1 changed files with 6 additions and 0 deletions

View File

@ -141,17 +141,23 @@ public class UIBuyGoodsController : UIWindow
private void WatchADFree(PropType prop)
{
//暂停游戏
Time.timeScale = 0f;
LevelManager.Instance.WatchADGetProp(prop, ADSuccessCallBack, ADFailCallBack);
}
private void ADSuccessCallBack()
{
//恢复游戏
Time.timeScale = 1f;
LevelManager.Instance.ADGetPropTips = _stringTipsContent;
CloseWin();
}
private void ADFailCallBack()
{
//恢复游戏
Time.timeScale = 1f;
BIManager.Instance.TrackEventLevel(Event.level_ad_show_fail, "101");
BIManager.Instance.TrackEventLevelOnce(EventFirst.fte_level_ad_show_fail, "101");
UIManager.Instance.OpenWindow(UIConstants.UITips, "Tip_AD_NotReady", () => { });