Beispiel #1
0
        // --------------------------------------------------------------------------------------------
        public override void Destroy()
        {
            base.Destroy();

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

            if (_instance != null)
            {
                Debug.LogError("An instance of UIWorldIteractionManager already exists!");
                Destroy();
            }
            else
            {
                _instance = this;
            }
        }
Beispiel #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);
        }