接入外部sdk

This commit is contained in:
2026-06-05 15:02:47 +08:00
parent 53d578b6eb
commit cb476b3988
864 changed files with 43510 additions and 550 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();
}
}
}
}