Exemplo n.º 1
0
        /****************************************************************************************/
        public static void Initialize(GameServiceContainer Services)
        {
            CoreContainer = new ContentManager(Services);
            CoreContainer.RootDirectory = "Content";
            GameContainer = new ContentManager(Services);
            GameContainer.RootDirectory = "Content";
            PersistantContainer = new ContentManager(Services);
            PersistantContainer.RootDirectory = "Content";
            NULLED_TEXTURE = CoreContainer.Load<Texture2D>(Assets.NULL_TEXTURE);
            mDebug.Initialize(mGraphics.Peek.Device(), CoreContainer, Assets.DEBUG_FONT, Vector2.Zero);

            SunColor = DebugMessage.Initialize(true, Color.White, true, "Sun Color: Calculating...");
            SunIntensity = DebugMessage.Initialize(true, Color.White, true, "Sun Intensity: Calculating...");
            SunPosition = DebugMessage.Initialize(true, Color.White, true, "Sun Position: Calculating...");
        }
Exemplo n.º 2
0
        public static void Initialize(GraphicsDevice Device, ContentManager Content, string strFontAsset, Vector2 v2Position)
        {
            _t2dBackground = new Texture2D(Device, 1, 1);
            Color[] _tempColor = new Color[1];
            _tempColor[0] = new Color(0.0f, 0.0f, 0.0f, 0.5f);
            _t2dBackground.SetData(_tempColor);

            DebugContainer = new List<DebugData>();

            BarPosition = v2Position;

            _spfDebug = Content.Load<SpriteFont>(strFontAsset);

            _BarBounds = new Rectangle(0, 0, 0, 0);
            /*Init the Built in Information*/
            _FPS = DebugMessage.Initialize(true, Color.White, true, "FPS: Calculating...");

            _InitialWorkingSet = DebugMessage.Initialize(true, Color.Green, true, ("Initial Working Set: ") + (Environment.WorkingSet / 1024) + ("KB"));

            _WorkingSet = DebugMessage.Initialize(true, Color.White, true, ("Working Set: ") + (Environment.WorkingSet / 1024) + ("KB"));
            _WorkingSet.Color = Color.Yellow;

            _GarbageHeap = DebugMessage.Initialize(true, Color.White, true, ("Garbage Heap: ") + (System.GC.GetTotalMemory(false) / 1024) + ("KB"));
            _GarbageHeap.Color = Color.Red;

            _RunTime = DebugMessage.Initialize(true, Color.White, true, ("Run Time: Calculating..."));

            _UpdateTime = DebugMessage.Initialize(true, Color.White, true, ("Update Time: Calculating..."));

            _DrawTime = DebugMessage.Initialize(true, Color.White, true, ("Draw Time: Calculating..."));

            /*Init Threaded Timer*/
            Stopwatch = new Stopwatch();
            _swWatchUpdate = new Stopwatch(); _swWatchDraw = new Stopwatch();
        }
Exemplo n.º 3
0
 public static void Load(ContentManager Content, GraphicsDevice Device)
 {
     _VigEffect = Content.Load<Effect>("Graphics\\Shaders\\VignetteEffect");
     VignetteTarget = mGraphics.Peek.CreateRenderTarget(1, Device.PresentationParameters.BackBufferFormat);
     VigRadius = DebugMessage.Initialize(true, Color.White, true, "Vig Radius: Calculating...");
 }
Exemplo n.º 4
0
 /****************************************FUNCTIONS***************************************/
 /// <summary>
 /// (Void) Initialize the LiveDebug Component with a valid SpriteFont.
 /// </summary>
 /// <param name="Content">(ContentManager) Active Content Pool</param>
 /// <param name="sprFontAssetLocation">(SpriteFont) Location to the SpriteFont resource to use.</param>
 public void Initialize(ContentManager Content, String sprFontAssetLocation)
 {
     _iCurrentFPS = 0;
     _iPreviousFPS = 0;
     _iFrameCount = 0;
     _dTimer = 0;
     _iGarbageCollection = 0;
     _iWorkingSet = 0;
     _fBackgroundWidth = 0;
     bWasWireFramed = false;
     _lstDebugText = new List<MessageData>();
     _t2dBackground = new Texture2D(mGraphics.Peek.Device(), 1, 1);
     _rBackground = new Rectangle();
     _sprDebugFont = Content.Load<SpriteFont>(sprFontAssetLocation);
     _dmFPS = new DebugMessage("FPS: Calculating...", true); //Initialize our Debug Message for FPS
     _dmGarbage = new DebugMessage("Garbage Heap: Calculating...", true);
     _dmWorkingSet = new DebugMessage("Working Set: Calculating...", true);
     _sWatch = new Stopwatch();
     _sWatch = Stopwatch.StartNew();
     Color[] temp = new Color[1];
     temp[0] = new Color(0, 0, 0, 128);
     _t2dBackground.SetData(temp);
     temp = null;
 }