using System.Collections; using System.Collections.Generic; using UnityEngine; public class BannerSpace : MonoBehaviour { [SerializeField] private RectTransform rect; private void Awake() { if (rect == null) { rect = GetComponent(); } if(rect != null) { if(GameManager.DB.IsRemoveADS == true) { rect.offsetMax = new Vector2(rect.offsetMax.x, 0); } else { rect.offsetMax = new Vector2(rect.offsetMax.x, -150); } } GameManager.ADS.OnDestroyBannerAd += OnDestroyBannerAd; } private void OnDestroyBannerAd(bool isDestroy) { if (rect != null) { if (isDestroy == true) { rect.offsetMax = new Vector2(rect.offsetMax.x, 0); } else { rect.offsetMax = new Vector2(rect.offsetMax.x, -150); } } } }