Beispiel #1
0
        public AboutSkill()
        {
            hideFlags = HideFlags.DontSave;

            if (_Instance != null)
            {
                Debug.LogError("Trying to create two instances of singleton. Self destruction in 3...");
                Destroy(this);
                return;
            }
            _Instance = this;

            titleContent  = new GUIContent("About Skill");
            base.position = new Rect((Screen.width - Size.x) / 2.0f, (Screen.height - Size.y) / 2.0f, Size.x, Size.y);
            base.minSize  = new Vector2(Size.x, Size.y);

            CreateUI();
        }
Beispiel #2
0
 void OnDestroy()
 {
     _Instance = null;
 }