Esempio n. 1
0
 public ThreadLoopTracker(GamePerformance parent, string name, int threadID)
     : base(parent)
 {
     id         = threadID;
     this.name  = name;
     lockObject = new Object();
 }
Esempio 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
        }
Esempio n. 3
0
 public PerformanceTracker(GamePerformance parent, string name)
     : base(parent)
 {
     _name              = name;
     zonesUsed          = 0;
     zoneData           = new Dictionary <int, ZoneData>();
     zoneDataLockObject = new Object();
 }
Esempio 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();
        }
Esempio n. 5
0
 public Tracker(GamePerformance parent)
 {
     _parent = parent;
 }
Esempio n. 6
0
 public void GenericConstructor(GamePerformance parent, string name)
 {
     _parent = parent;
     _name   = name;
 }
Esempio n. 7
0
 public FramerateTracker(GamePerformance parent)
     : base(parent)
 {
     graphLegend = new string[] { "60", "30", "10" };
     lastFPS     = new List <int>();
 }
Esempio n. 8
0
 public RenderTimeTracker(GamePerformance parent)
     : base(parent)
 {
 }
Esempio n. 9
0
 public UpdateTimeTracker(GamePerformance parent)
     : base(parent)
 {
     history = new Queue <long>();
 }
Esempio n. 10
0
 public ReferenceTypeTracker(GamePerformance parent, string name)
     : base(parent)
 {
     _name = name;
 }
Esempio n. 11
0
 public PerformanceTracker(GamePerformance parent, string name)
     : base(parent)
 {
     history = new Queue <int>();
     _name   = name;
 }
Esempio 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);
 }
Esempio n. 13
0
 public FramerateTracker(GamePerformance parent)
     : base(parent)
 {
     lastFPS = new List <int>();
 }
Esempio n. 14
0
 public RenderTimeTracker(GamePerformance parent)
     : base(parent)
 {
     history = new Queue <long>(maxHistory);
 }
Esempio 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;
 }