You've already forked CC-Framework.Commercialization
release: 1.0.12
This commit is contained in:
@@ -10,6 +10,8 @@ namespace Runtime.ADAggregator
|
||||
private bool firstLoad;
|
||||
private bool isKill;
|
||||
private bool isUpdate;
|
||||
private int loadAttempts;
|
||||
private float nextLoadRetryTime;
|
||||
private AdTimeHandler overHandler;
|
||||
private string _Ad_scene;
|
||||
|
||||
@@ -23,6 +25,8 @@ namespace Runtime.ADAggregator
|
||||
this._callback = callback;
|
||||
this.isKill = false;
|
||||
this.firstLoad = true;
|
||||
this.loadAttempts = 0;
|
||||
this.nextLoadRetryTime = 0f;
|
||||
this._adPlayer = player;
|
||||
if (_adPlayer == null)
|
||||
{
|
||||
@@ -36,6 +40,7 @@ namespace Runtime.ADAggregator
|
||||
ADManager.Instance.OpenMask();
|
||||
_adPlayer.OnErrorAction = OnError;
|
||||
_adPlayer.AdScene = this._Ad_scene;
|
||||
_adPlayer.OnPlayRequestStarted();
|
||||
isUpdate = true;
|
||||
ADManager.Instance.AddUpdater(DoUpdate);
|
||||
}
|
||||
@@ -83,14 +88,20 @@ namespace Runtime.ADAggregator
|
||||
}
|
||||
else if(!_adPlayer.IsLoading())
|
||||
{
|
||||
if (firstLoad)
|
||||
if (loadAttempts < _adPlayer.MaxLoadAttempts)
|
||||
{
|
||||
if (this._outTime < nextLoadRetryTime)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
Debug.LogError("开始加载广告: " + this._adPlayer.Key);
|
||||
#endif
|
||||
this._outTime = 0;
|
||||
_adPlayer.LoadAD();
|
||||
loadAttempts++;
|
||||
firstLoad = false;
|
||||
nextLoadRetryTime = this._outTime + _adPlayer.LoadRetryDelaySeconds;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user