summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/GoogleMobileAds/Api/CustomNativeTemplateAd.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2020-12-30 20:59:04 +0800
committerchai <chaifix@163.com>2020-12-30 20:59:04 +0800
commite9ea621b93fbb58d9edfca8375918791637bbd52 (patch)
tree19ce3b1c1f2d51eda6878c9d0f2c9edc27f13650 /Client/Assembly-CSharp/GoogleMobileAds/Api/CustomNativeTemplateAd.cs
+init
Diffstat (limited to 'Client/Assembly-CSharp/GoogleMobileAds/Api/CustomNativeTemplateAd.cs')
-rw-r--r--Client/Assembly-CSharp/GoogleMobileAds/Api/CustomNativeTemplateAd.cs52
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();
+ }
+ }
+}