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

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

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