File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
articles/tutorials/building_2d_games/05_game_components/snippets Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public FramesPerSecondCounter(Game game) : base(game)
33
33
/// Updates the FPS calculation based on elapsed game time.
34
34
/// </summary>
35
35
/// <param name="gameTime">A snapshot of the game's timing values.</param>
36
- public override Update ( GameTime gameTime )
36
+ public override void Update ( GameTime gameTime )
37
37
{
38
38
_elapsedTime += gameTime . ElapsedGameTime ;
39
39
@@ -48,7 +48,7 @@ public override Update(GameTime gameTime)
48
48
/// <summary>
49
49
/// Increments the frame counter. Should be called once per frame during the game's Draw method.
50
50
/// </summary>
51
- public override Draw ( GameTime gameTime )
51
+ public override void Draw ( GameTime gameTime )
52
52
{
53
53
// Increment the frame counter only during draw.
54
54
_frameCounter ++ ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public Game1()
17
17
IsMouseVisible = true ;
18
18
19
19
// Create a new FramesPerSecondCounter.
20
- FramesPerSecondCounter fpsCounter = new FramesPerSecondCounter ( ) ;
20
+ FramesPerSecondCounter fpsCounter = new FramesPerSecondCounter ( this ) ;
21
21
22
22
// Add it to the game's component collection
23
23
Components . Add ( fpsCounter ) ;
You can’t perform that action at this time.
0 commit comments