コード例 #1
0
        protected override Variable Evaluate(ParsingScript script)
        {
            AdMob.ShowInterstitialAd(AppDelegate.GetCurrentController());
            script.MoveForwardIf(Constants.END_ARG);

            return(Variable.EmptyInstance);
        }
コード例 #2
0
        protected override Variable Evaluate(ParsingScript script)
        {
            bool            isList = false;
            List <Variable> args   = Utils.GetArgs(script,
                                                   Constants.START_ARG, Constants.END_ARG, out isList);

            Utils.CheckArgs(args.Count, 2, m_name);

            string appId     = args[0].AsString();
            string interstId = Utils.GetSafeString(args, 1);
            string bannerId  = Utils.GetSafeString(args, 1);

            if (!m_initDone)
            {
                AdMob.Init(appId, interstId, bannerId);
                m_initDone = true;
            }

            return(Variable.EmptyInstance);
        }
コード例 #3
0
 public static void AdjustSizes(string widgetType, iOSVariable location,
                                string text, ref int width, ref int height)
 {
     if (widgetType == "Picker")
     {
         height = (int)(height * COMBOBOX_EXTENTION);
         //location.TranslationY += COMBOBOX_Y_MARGIN;
     }
     else if (widgetType == "AdMobBanner")
     {
         AdMob.GetAdSize(text, ref width, ref height);
     }
     if (widgetType == "TypePicker" || widgetType == "Picker")
     {
         int screenWidth = (int)UtilsiOS.GetRealScreenWidth();
         if (screenWidth <= AutoScaleFunction.BASE_WIDTH)
         {
             // Check Combo height for smaller iPhones
             height = Math.Max(height, MAX_COMBO_HEIGHT_SMALL);
         }
     }
     location.SetSize(width, height);
 }