Esempio n. 1
0
        // --------------------------------------------------------------------------------------------
        public override void Destroy()
        {
            base.Destroy();

            if (_instance == this)
            {
                _instance = null;
            }
        }
Esempio n. 2
0
        // --------------------------------------------------------------------------------------------
        protected override void PostRender()
        {
            base.PostRender();

            if (_instance != null)
            {
                Debug.LogError("An instance of UIWorldIteractionManager already exists!");
                Destroy();
            }
            else
            {
                _instance = this;
            }
        }
Esempio n. 3
0
        // --------------------------------------------------------------------------------------------
        public static UIWorldInteractionPanel Create(Game game)
        {
            if (_instance != null)
            {
                Debug.LogError("An instance of UIWorldIteractionManager already exists!");
                return(null);
            }

            UIWorldInteractionPanel toReturn = new UIWorldInteractionPanel(game);

            UIMainCanvas.Instance.AddChild(toReturn, UIPriorities.UIWorldInteractionPanel);

            return(toReturn);
        }