From e9ea621b93fbb58d9edfca8375918791637bbd52 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 30 Dec 2020 20:59:04 +0800 Subject: +init --- .../GoogleMobileAds/Api/CustomNativeTemplateAd.cs | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Client/Assembly-CSharp/GoogleMobileAds/Api/CustomNativeTemplateAd.cs (limited to 'Client/Assembly-CSharp/GoogleMobileAds/Api/CustomNativeTemplateAd.cs') 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 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(); + } + } +} -- cgit v1.1-26-g67d0