【测试】广告播放前暂停游戏
parent
de8b083cd2
commit
30a963b394
|
@ -141,17 +141,23 @@ public class UIBuyGoodsController : UIWindow
|
||||||
|
|
||||||
private void WatchADFree(PropType prop)
|
private void WatchADFree(PropType prop)
|
||||||
{
|
{
|
||||||
|
//暂停游戏
|
||||||
|
Time.timeScale = 0f;
|
||||||
LevelManager.Instance.WatchADGetProp(prop, ADSuccessCallBack, ADFailCallBack);
|
LevelManager.Instance.WatchADGetProp(prop, ADSuccessCallBack, ADFailCallBack);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ADSuccessCallBack()
|
private void ADSuccessCallBack()
|
||||||
{
|
{
|
||||||
|
//恢复游戏
|
||||||
|
Time.timeScale = 1f;
|
||||||
LevelManager.Instance.ADGetPropTips = _stringTipsContent;
|
LevelManager.Instance.ADGetPropTips = _stringTipsContent;
|
||||||
CloseWin();
|
CloseWin();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ADFailCallBack()
|
private void ADFailCallBack()
|
||||||
{
|
{
|
||||||
|
//恢复游戏
|
||||||
|
Time.timeScale = 1f;
|
||||||
BIManager.Instance.TrackEventLevel(Event.level_ad_show_fail, "101");
|
BIManager.Instance.TrackEventLevel(Event.level_ad_show_fail, "101");
|
||||||
BIManager.Instance.TrackEventLevelOnce(EventFirst.fte_level_ad_show_fail, "101");
|
BIManager.Instance.TrackEventLevelOnce(EventFirst.fte_level_ad_show_fail, "101");
|
||||||
UIManager.Instance.OpenWindow(UIConstants.UITips, "Tip_AD_NotReady", () => { });
|
UIManager.Instance.OpenWindow(UIConstants.UITips, "Tip_AD_NotReady", () => { });
|
||||||
|
|
Loading…
Reference in New Issue