diff options
Diffstat (limited to 'Client/Assembly-CSharp/GoogleMobileAds/Api/CustomNativeTemplateAd.cs')
-rw-r--r-- | Client/Assembly-CSharp/GoogleMobileAds/Api/CustomNativeTemplateAd.cs | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Client/Assembly-CSharp/GoogleMobileAds/Api/CustomNativeTemplateAd.cs b/Client/Assembly-CSharp/GoogleMobileAds/Api/CustomNativeTemplateAd.cs new file mode 100644 index 0000000..159341b --- /dev/null +++ b/Client/Assembly-CSharp/GoogleMobileAds/Api/CustomNativeTemplateAd.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using GoogleMobileAds.Common; +using UnityEngine; + +namespace GoogleMobileAds.Api +{ + public class CustomNativeTemplateAd + { + private ICustomNativeTemplateClient client; + + internal CustomNativeTemplateAd(ICustomNativeTemplateClient client) + { + this.client = client; + } + + public List<string> GetAvailableAssetNames() + { + return this.client.GetAvailableAssetNames(); + } + + public string GetCustomTemplateId() + { + return this.client.GetTemplateId(); + } + + public Texture2D GetTexture2D(string key) + { + byte[] imageByteArray = this.client.GetImageByteArray(key); + if (imageByteArray == null) + { + return null; + } + return Utils.GetTexture2DFromByteArray(imageByteArray); + } + + public string GetText(string key) + { + return this.client.GetText(key); + } + + public void PerformClick(string assetName) + { + this.client.PerformClick(assetName); + } + + public void RecordImpression() + { + this.client.RecordImpression(); + } + } +} |