This commit is contained in:
yangjing 2022-09-13 11:38:41 +08:00
parent f89cffb684
commit b41b2c493e
1 changed files with 12 additions and 26 deletions

View File

@ -74,39 +74,25 @@ public static class AdsUtils
public static void PlayReward(TKGRVPositionName pAdPos, Action pSuccessCallback = null)
{
if (TKGSDKManager.Instance.IsReadyRewardAd())
TKGSDKManager.Instance.ShowRewardAd(pAdPos, (pResult) =>
{
TKGSDKManager.Instance.ShowRewardAd(pAdPos, (pResult) =>
if (pResult)
{
if (pResult)
{
pSuccessCallback?.Invoke();
MMOModule.Instance.WatchRVSuccessfully();
}
}, UIUtils.ShowNoAdsTip);
}
else
{
UIUtils.ShowNoAdsTip();
}
pSuccessCallback?.Invoke();
MMOModule.Instance.WatchRVSuccessfully();
}
}, UIUtils.ShowNoAdsTip);
}
public static void PlayReward(TKGRVPositionName pAdPos, Action<bool> pResultCallback = null)
{
if (TKGSDKManager.Instance.IsReadyRewardAd())
TKGSDKManager.Instance.ShowRewardAd(pAdPos, (pResult) =>
{
TKGSDKManager.Instance.ShowRewardAd(pAdPos, (pResult) =>
pResultCallback?.Invoke(pResult);
if (pResult)
{
pResultCallback?.Invoke(pResult);
if (pResult)
{
MMOModule.Instance.WatchRVSuccessfully();
}
}, UIUtils.ShowNoAdsTip);
}
else
{
UIUtils.ShowNoAdsTip();
}
MMOModule.Instance.WatchRVSuccessfully();
}
}, UIUtils.ShowNoAdsTip);
}
}