【发布时间】:2018-05-18 02:17:26
【问题描述】:
我使用下面的 obj.C 代码来处理广告展示之间的时间。但是现在我需要在 C# 中为 Unity3D 编写相同的代码。
-(void)showFullScreenads
{
static NSTimeInterval gCBLastFail = -999;
static bool isFirssst = true;
if(!isFirssst)
{
NSTimeInterval intr = [NSDate timeIntervalSinceReferenceDate];
float diff = intr - gCBLastFail;
if(diff < 60.0f) // don't show ads if less than 60 sec
{
return;
}
else
{
gCBLastFail = [NSDate timeIntervalSinceReferenceDate];
}
}
gCBLastFail = [NSDate timeIntervalSinceReferenceDate];
isFirssst = false;
[self showGoogleAdmobAds];
}
为 unity3d 寻找相同的样式代码来控制广告之间的时间。请帮帮我。
【问题讨论】:
标签: c# ios iphone xcode unity3d