Amphibian.Debug.TimeHistory.Initialize C# (CSharp) Method

Initialize() public method

public Initialize ( ) : void
return void
        public override void Initialize()
        {
            // Get debug manager from game service.
            debugManager =
                Game.Services.GetService(typeof(DebugManager)) as DebugManager;

            if (debugManager == null)
                throw new InvalidOperationException("DebugManaer is not registered.");

            // Register 'fps' command if debug command is registered as a service.
            IDebugCommandHost host =
                                Game.Services.GetService(typeof(IDebugCommandHost))
                                                                as IDebugCommandHost;

            if (host != null) {
                host.RegisterCommand("th", "Time History", this.CommandExecute);
                Visible = false;
            }

            // Initialize parameters.
            stringBuilder.Length = 0;

            InitializeHistory();

            base.Initialize();
        }