fix:1、接入外部sdk

This commit is contained in:
2026-05-20 14:29:11 +08:00
parent aca0e4d1af
commit d8b41f25ba
890 changed files with 45707 additions and 1095 deletions
@@ -0,0 +1,29 @@
using System;
using BigoAds.Scripts.Common;
namespace BigoAds.Scripts.Api
{
public class BigoRewardedAd : BigoBaseAd<BigoRewardedRequest>
{
public event Action OnUserEarnedReward;
public BigoRewardedAd(string slotId) : base(slotId, BigoAdSdk.GetClientFactory().BuildRewardedAdClient())
{
var rewardedAdClient = (IRewardedAd) ADClient;
rewardedAdClient.OnUserEarnedReward += InvokeOnUserEarnedReward;
}
private void InvokeOnUserEarnedReward()
{
if (CallbackOnMainThread)
{
BigoDispatcher.PostTask((() => { OnUserEarnedReward?.Invoke(); }));
}
else
{
OnUserEarnedReward?.Invoke();
}
}
}
}