object类型转换
This commit is contained in:
parent
426ef62b6d
commit
df5dccc8cf
|
@ -230,9 +230,13 @@ namespace WZ
|
|||
|
||||
private Parameter GetParameter(string key, object value)
|
||||
{
|
||||
Type type = value.GetType();
|
||||
|
||||
// 根据类型进行转换
|
||||
if (value == null)
|
||||
{
|
||||
return new Parameter(key, "");
|
||||
}
|
||||
|
||||
Type type = value.GetType();
|
||||
if (type == typeof(string))
|
||||
{
|
||||
return new Parameter(key, value as string);
|
||||
|
|
|
@ -159,6 +159,11 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
|||
return AdsSDKManager.Instance.IsInterstitialReady();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否能展示插屏
|
||||
/// </summary>
|
||||
/// <param name="ivType"></param>
|
||||
/// <returns></returns>
|
||||
public bool CanShowInterstitialAd(IvType ivType)
|
||||
{
|
||||
return AdsSDKManager.Instance.IvRulesShow(ivType, false);
|
||||
|
@ -255,6 +260,13 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
|||
return AdsSDKManager.Instance.IsNativeAdReady(adUnitId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="rectTransform"></param>
|
||||
/// <param name="pCom"></param>
|
||||
/// <param name="position"></param>
|
||||
/// <param name="nativeTemplateStyle"></param>
|
||||
public void ShowFullNative(RectTransform rectTransform, Camera pCom = null, string position = "", NativeTemplateStyle nativeTemplateStyle = null)
|
||||
{
|
||||
AdsActionEvents.TrackAdPosition(AdsType.Native, position);
|
||||
|
@ -320,7 +332,9 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
|||
{
|
||||
nativeTemplateStyle = new NativeTemplateStyle
|
||||
{
|
||||
//除了中型Native,其他的都是Small
|
||||
TemplateId = NativeTemplateId.Small,
|
||||
//背景颜色
|
||||
MainBackgroundColor = Color.white
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue