public virtual void OnGet(Transform parent)
        {
            var p = PC();

            InPool = false;
            OpenWindowCount++;
            IsOpen = true;
            gameObject.SetActive(true);
            transform.ToRect().offsetMax = p.GetTemplate(GetType()).transform.ToRect().offsetMax;
            transform.ToRect().offsetMin = p.GetTemplate(GetType()).transform.ToRect().offsetMin;
            OpenWindows.AddToList(this);
        }
Beispiel #2
0
        private void OnDestroy()
        {
            while (_Windows != null && _Windows.Count > 0)
            {
                if (_Windows.Count <= 0)
                {
                    break;
                }

                _Windows[0].Close.onClick.Invoke();
            }

            Instance = null;
        }
Beispiel #3
0
 void Awake()
 {
     Instance = this;
     gameObject.SetActive(false);
 }