コード例 #1
0
ファイル: DebuggerView.cs プロジェクト: huangjk/Ash
        /// <summary>
        /// 游戏框架组件初始化。
        /// </summary>
        private void Awake()
        {
            if (_instance == null)
            {
                _instance = this;
            }

            if (_instance != null && _instance != this)
            {
                Destroy(this.gameObject);
                return;
            }

            m_DebuggerManager = new DebuggerManager();

            if (m_ActiveWindow == DebuggerActiveWindowType.Auto)
            {
                ActiveWindow = Debug.isDebugBuild;
            }
            else
            {
                ActiveWindow = (m_ActiveWindow == DebuggerActiveWindowType.Open);
            }

            m_FpsCounter = new FpsCounter(0.5f);
        }
コード例 #2
0
            public override void Initialize(params object[] args)
            {
                m_DebuggerComponent = DebuggerView.Instance;
                if (m_DebuggerComponent == null)
                {
                    Log.Fatal("Debugger component is invalid.");
                    return;
                }

                m_LastIconX        = Setting.GetInstance().Get("Debugger.Icon.X", DefaultIconRect.x);
                m_LastIconY        = Setting.GetInstance().Get("Debugger.Icon.Y", DefaultIconRect.y);
                m_LastWindowX      = Setting.GetInstance().Get("Debugger.Window.X", DefaultWindowRect.x);
                m_LastWindowY      = Setting.GetInstance().Get("Debugger.Window.Y", DefaultWindowRect.y);
                m_LastWindowWidth  = Setting.GetInstance().Get("Debugger.Window.Width", DefaultWindowRect.width);
                m_LastWindowHeight = Setting.GetInstance().Get("Debugger.Window.Height", DefaultWindowRect.height);
                m_DebuggerComponent.WindowScale = m_LastWindowScale = Setting.GetInstance().Get("Debugger.Window.Scale", DefaultWindowScale);
                m_DebuggerComponent.IconRect    = new Rect(m_LastIconX, m_LastIconY, DefaultIconRect.width, DefaultIconRect.height);
                m_DebuggerComponent.WindowRect  = new Rect(m_LastWindowX, m_LastWindowY, m_LastWindowWidth, m_LastWindowHeight);
            }