123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
-
- using System;
- namespace GameFramework.Debugger
- {
-
-
-
- internal sealed partial class DebuggerManager : IDebuggerManager
- {
- private readonly DebuggerWindowGroup m_DebuggerWindowRoot;
- private bool m_ActiveWindow;
-
-
-
- public DebuggerManager()
- {
- m_DebuggerWindowRoot = new DebuggerWindowGroup();
- m_ActiveWindow = false;
- }
-
-
-
- public bool ActiveWindow
- {
- get
- {
- return m_ActiveWindow;
- }
- set
- {
- m_ActiveWindow = value;
- }
- }
-
-
-
- public IDebuggerWindowGroup DebuggerWindowRoot
- {
- get
- {
- return m_DebuggerWindowRoot;
- }
- }
-
-
-
-
-
- internal void Update(float elapseSeconds, float realElapseSeconds)
- {
- if (!m_ActiveWindow)
- {
- return;
- }
- m_DebuggerWindowRoot.OnUpdate(elapseSeconds, realElapseSeconds);
- }
-
-
-
- internal void Shutdown()
- {
- m_ActiveWindow = false;
- m_DebuggerWindowRoot.Shutdown();
- }
-
-
-
-
-
-
- public void RegisterDebuggerWindow(string path, IDebuggerWindow debuggerWindow, params object[] args)
- {
- if (string.IsNullOrEmpty(path))
- {
- throw new ArgumentNullException("Path is invalid.");
- }
- if (debuggerWindow == null)
- {
- throw new ArgumentNullException("Debugger window is invalid.");
- }
- m_DebuggerWindowRoot.RegisterDebuggerWindow(path, debuggerWindow);
- debuggerWindow.Initialize(args);
- }
-
-
-
-
-
- public IDebuggerWindow GetDebuggerWindow(string path)
- {
- return m_DebuggerWindowRoot.GetDebuggerWindow(path);
- }
- }
- }
|