Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="graphManager">reference to the graph manager</param>
        /// <param name="frequency">how often should it probe for a new value</param>
        /// <param name="capacity">how many probes store in memory and draw in graph window</param>
        public DebugGraph(ref GraphManager graphManager, float frequency, int capacity)
        {
            position          = new Vector2(0.0f);
            width             = 200;
            height            = 75;
            this.frequency    = frequency;
            this.capacity     = capacity;
            probesContainer   = new ArrayList(capacity);
            this.graphManager = graphManager;
            maxSampleValue    = 1;

            for (int index = 0; index < capacity; index++)
            {
                probesContainer.Add(0.0f);
            }
        }
Ejemplo n.º 2
0
        public SEngine(Game game, GraphicsDeviceManager graphicsManager)
            : base(game)
        {
            this.game            = game;
            this.graphicsManager = graphicsManager;

            safeRegion        = new SafeRegion(graphicsManager);
            gcGraphWindow     = new Rectangle();
            debugGraphManager = new GraphManager(game, this);
            debugGraphManager.SafeDimensions = safeRegion.SafeDimensions;

            debugGCGraph          = new GCGraph(ref debugGraphManager, 0.5f, 50);
            debugGCGraph.Position = new Vector2(0, 0);
            debugGraphManager.AddGraph(ref debugGCGraph);
            debugFPSGraph          = new FPSGraph(ref debugGraphManager, 0.5f, 50);
            debugFPSGraph.Position = new Vector2(0, debugGCGraph.Height + 5);
            debugGraphManager.AddGraph(ref debugFPSGraph);

            game.Components.Add(debugGraphManager);
        }