public void loadBannerForZoneId(string zoneId, AMR.Enums.AMRSDKBannerPosition position, int offset, AMRBannerViewDelegate delegateObject) { delegateObj = delegateObject; banner.Call("create", new object[4] { zoneId, 50, (int)position, offset }); }
public static void loadBanner(AMR.Enums.AMRSDKBannerPosition position, int offset, bool autoShow) { if (!initialized()) { return; } AMRBannerView.Instance.loadBannerForZoneId(Instance.Config.BannerIdIOS, Instance.Config.BannerIdAndroid, position, offset, autoShow); }
public void loadBannerForZoneId(string zoneIdiOS, string zoneIdAndroid, AMR.Enums.AMRSDKBannerPosition position, int offset, bool autoShow) { if (state == BannerState.Loading) { return; } this.zoneIdiOS = zoneIdiOS; this.zoneIdAndroid = zoneIdAndroid; this.position = position; this.offset = offset; this.autoShow = autoShow; this.isConflicted = false; hideBanner(); state = BannerState.Loading; BannerDelegate bDelegate = new BannerDelegate(this); if (Application.platform == RuntimePlatform.IPhonePlayer) { if (zoneIdiOS != null) { Banner = new AMR.iOS.AMRBanner(); Banner.loadBannerForZoneId(zoneIdiOS, position, offset, bDelegate); } } else if (Application.platform == RuntimePlatform.Android) { if (zoneIdAndroid != null) { if (Banner == null) { Banner = new AMR.Android.AMRBanner(); } Banner.loadBannerForZoneId(zoneIdAndroid, position, offset, bDelegate); } } }
public void loadBannerForZoneId(string zoneId, AMR.Enums.AMRSDKBannerPosition position, int offset, AMRBannerViewDelegate delegateObject) { #if UNITY_IOS _setBannerSuccessCallback(bannerSuccessCallback); _setBannerClickCallback(bannerClickCallback); _setBannerFailCallback(bannerFailCallback); GCHandle handle = GCHandle.Alloc(delegateObject); IntPtr parameter = (IntPtr)handle; // call WinAPi and pass the parameter here bannerPtr = _loadBannerForZoneId(zoneId, position, offset, parameter); #endif }
private static extern IntPtr _loadBannerForZoneId(string zoneId, AMR.Enums.AMRSDKBannerPosition position, int offset, IntPtr bannerHandle);