private void SetPosition(AdPosition position, int x, int y)
 {
     if (position == AdPosition.Undefined)
     {
         return;
     }
     if (position != _position || x != _positionX || y != _positionY)
     {
         _manager.Log("Banner position changed to " + position.ToString() + " with offset: x=" + x + ", y=" + y);
         _position  = position;
         _positionX = x;
         _positionY = y;
     }
 }
Beispiel #2
0
        public IViewComponentResult Invoke(AdPosition position)
        {
            IAdType ad             = null;
            var     positionString = position.ToString();

            if (_bunIpConfig.Ad != null)
            {
                ad = typeof(Configs.BunIpConfigs.Ad).GetProperty(positionString).GetValue(_bunIpConfig.Ad) as IAdType;
            }

            var model = new ViewModel
            {
                Ad       = ad,
                Position = position
            };

            return(View(model));
        }
 public virtual void RequestAd(AdPosition position)
 {
     Debug.Log("Loading ad... at " + position.ToString());
     //AdmobComponentsManager.instance.onSendToBackAds.Invoke();
 }