You've already forked CC-Framework.Commercialization
update core
This commit is contained in:
@@ -51,6 +51,11 @@ namespace Runtime.ADAggregator
|
||||
|
||||
private string _userId;
|
||||
|
||||
/// <summary>
|
||||
/// 全局任意视频广告播放结束后事件, bool 表示是否完成奖励
|
||||
/// </summary>
|
||||
public event Action<bool> GLOBAL_ShowAwardVideoComplete;
|
||||
|
||||
public string UserId => _userId;
|
||||
|
||||
#pragma warning disable CS0414
|
||||
@@ -136,6 +141,10 @@ namespace Runtime.ADAggregator
|
||||
public void AsyncPlayAD(AD_Type adType, string adScene, Action<bool> callback)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if (adType == AD_Type.AwardVideo)
|
||||
{
|
||||
this.OnVideoComplete(true);
|
||||
}
|
||||
callback?.Invoke(true);
|
||||
return;
|
||||
#endif
|
||||
@@ -174,7 +183,9 @@ namespace Runtime.ADAggregator
|
||||
return null;
|
||||
}
|
||||
#pragma warning disable CS0162
|
||||
return _adController.CreateAdPlayer(type);
|
||||
var adPlayer = _adController.CreateAdPlayer(type);
|
||||
adPlayer.ADType = type;
|
||||
return adPlayer;
|
||||
#pragma warning restore CS0162
|
||||
}
|
||||
|
||||
@@ -296,5 +307,10 @@ namespace Runtime.ADAggregator
|
||||
{
|
||||
_adController.SetMask(true);
|
||||
}
|
||||
|
||||
internal void OnVideoComplete(bool isComplete)
|
||||
{
|
||||
GLOBAL_ShowAwardVideoComplete?.Invoke(isComplete);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user