Exemplo n.º 1
0
 public ThreadLoopTracker(GamePerformance parent, string name, int threadID)
     : base(parent)
 {
     id         = threadID;
     this.name  = name;
     lockObject = new Object();
 }
Exemplo n.º 2
0
        protected override void Initialize()
        {
#if SHARP_RAVEN
            try
            {
#endif
            var dir = GetGameDirectory();
            if (!System.IO.Directory.Exists(dir))
            {
                System.IO.Directory.CreateDirectory(dir);
            }
            InitializeLogger();
            Thread.CurrentThread.Name = "Main";
            // Goes before anything else so we can track from the very start.
            GamePerformance.Initialize(this);

            SpriteBatch = new SpriteBatch(GraphicsDevice);
            base.Initialize();
#if SHARP_RAVEN
        }

        catch (Exception exception)
        {
            if (ravenClient != null)
            {
                ravenClient.Capture(new SentryEvent(exception));
            }
            throw;
        }
#endif
        }
Exemplo n.º 3
0
 public PerformanceTracker(GamePerformance parent, string name)
     : base(parent)
 {
     _name              = name;
     zonesUsed          = 0;
     zoneData           = new Dictionary <int, ZoneData>();
     zoneDataLockObject = new Object();
 }
Exemplo n.º 4
0
        protected override void Initialize()
        {
            // Goes before anything else so we can track from the very start.
            GamePerformance.Initialize(this);
            // TODO: Find a more appropriate spot for this.
            GameObjectCaching.Initialize();

            SpriteBatch = new SpriteBatch(GraphicsDevice);
            base.Initialize();
        }
Exemplo n.º 5
0
 public Tracker(GamePerformance parent)
 {
     _parent = parent;
 }
Exemplo n.º 6
0
 public void GenericConstructor(GamePerformance parent, string name)
 {
     _parent = parent;
     _name   = name;
 }
Exemplo n.º 7
0
 public FramerateTracker(GamePerformance parent)
     : base(parent)
 {
     graphLegend = new string[] { "60", "30", "10" };
     lastFPS     = new List <int>();
 }
Exemplo n.º 8
0
 public RenderTimeTracker(GamePerformance parent)
     : base(parent)
 {
 }
Exemplo n.º 9
0
 public UpdateTimeTracker(GamePerformance parent)
     : base(parent)
 {
     history = new Queue <long>();
 }
Exemplo n.º 10
0
 public ReferenceTypeTracker(GamePerformance parent, string name)
     : base(parent)
 {
     _name = name;
 }
Exemplo n.º 11
0
 public PerformanceTracker(GamePerformance parent, string name)
     : base(parent)
 {
     history = new Queue <int>();
     _name   = name;
 }
Exemplo n.º 12
0
 /// <summary>
 /// Creates the singleton for use.
 /// </summary>
 /// <param name="game">Reference to the base DwarfGame object.</param>
 public static void Initialize(DwarfGame game)
 {
     _instance = new GamePerformance(game);
 }
Exemplo n.º 13
0
 public FramerateTracker(GamePerformance parent)
     : base(parent)
 {
     lastFPS = new List <int>();
 }
Exemplo n.º 14
0
 public RenderTimeTracker(GamePerformance parent)
     : base(parent)
 {
     history = new Queue <long>(maxHistory);
 }
Exemplo n.º 15
0
 /// <summary>
 /// Creates the singleton for use.
 /// </summary>
 /// <param name="game">Reference to the base DwarfGame object.</param>
 public static void Initialize(DwarfGame game)
 {
     _instance             = new GamePerformance(game);
     millisecondMultiplier = (1.0f / Stopwatch.Frequency) * 1000;
 }