Skip to content

Commit b2b9687

Browse files
committed
Remove the base.LoadContent call, it's not needed
1 parent 6f3d38e commit b2b9687

File tree

24 files changed

+11
-36
lines changed

24 files changed

+11
-36
lines changed

articles/tutorials/building_2d_games/05_content_pipeline/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ Now that we have the MonoGame logo added as an asset in the content project, we
211211
212212
The complete updated `Game1.cs` file should now look like this
213213
214-
[!code-csharp[](./snippets/game1.cs?highlight=10-11,27,45-52)]
214+
[!code-csharp[](./snippets/game1.cs?highlight=10-11,27,44-51)]
215215
216216
Running the game now will show the MonoGame logo displayed in the upper-left corner of the game window.
217217

articles/tutorials/building_2d_games/05_content_pipeline/snippets/game1.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ protected override void Initialize()
2525
protected override void LoadContent()
2626
{
2727
_logo = Content.Load<Texture2D>("images/logo");
28-
base.LoadContent();
2928
}
3029

3130
protected override void Update(GameTime gameTime)

articles/tutorials/building_2d_games/07_optimizing_texture_rendering/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Add this texture atlas to your content project using the MGCB Editor:
172172
173173
First, we will explore creating the texture atlas and defining the texture regions directly in code. Replace the contents of *Game1.cs* with the following:
174174

175-
[!code-csharp[](./snippets/game1/textureatlas_usage.cs?highlight=5,11-15,31-47,67-77)]
175+
[!code-csharp[](./snippets/game1/textureatlas_usage.cs?highlight=5,11-15,31-47,65-75)]
176176

177177
The key changes in this implementation are:
178178

articles/tutorials/building_2d_games/07_optimizing_texture_rendering/snippets/game1/textureatlas_usage.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ protected override void LoadContent()
4545

4646
// retrieve the bat region from the atlas.
4747
_bat = atlas.GetRegion("bat");
48-
49-
base.LoadContent();
5048
}
5149

5250
protected override void Update(GameTime gameTime)

articles/tutorials/building_2d_games/07_optimizing_texture_rendering/snippets/game1/textureatlas_xml_usage.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ protected override void LoadContent()
3636

3737
// retrieve the bat region from the atlas.
3838
_bat = atlas.GetRegion("bat");
39-
40-
base.LoadContent();
4139
}
4240

4341
protected override void Update(GameTime gameTime)

articles/tutorials/building_2d_games/08_the_sprite_class/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ We can simplify this process by adding a sprite creation method to the `TextureA
7272

7373
Now we can adjust our game now to use the `Sprite` class instead of just the texture regions. Replace the contents of *Game1.cs* with the following:
7474

75-
[!code-csharp[](./snippets/game1.cs?highlight=11-15,34-40,63-67)]
75+
[!code-csharp[](./snippets/game1.cs?highlight=11-15,34-40,61-65)]
7676

7777
The key changes in this implementation are:
7878

articles/tutorials/building_2d_games/08_the_sprite_class/snippets/game1.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ protected override void LoadContent()
3838
// Create the bat sprite from the atlas.
3939
_bat = atlas.CreateSprite("bat");
4040
_bat.Scale = new Vector2(4.0f, 4.0f);
41-
42-
base.LoadContent();
4341
}
4442

4543
protected override void Update(GameTime gameTime)

articles/tutorials/building_2d_games/09_the_animatedsprite_class/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ We can simplify this process by adding an animated spirte creation method to the
170170

171171
We can now adjust our game now to use the `AnimatedSprite` class to see our sprites come to life. Replaces the contents of *Game1.cs* with the following:
172172

173-
[!code-csharp[](./snippets/game1.cs?highlight=11-15,34-40,50-54)]
173+
[!code-csharp[](./snippets/game1.cs?highlight=11-15,34-40,48-52)]
174174

175175
Here are the key changes in this implementation:
176176

articles/tutorials/building_2d_games/09_the_animatedsprite_class/snippets/game1.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ protected override void LoadContent()
3838
// Create the bat animated sprite from the atlas.
3939
_bat = atlas.CreateAnimatedSprite("bat-animation");
4040
_bat.Scale = new Vector2(4.0f, 4.0f);
41-
42-
base.LoadContent();
4341
}
4442

4543
protected override void Update(GameTime gameTime)

articles/tutorials/building_2d_games/10_handling_input/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ For our game, we are going to implement keyboard and gamepad controls based on t
330330

331331
Open *Game1.cs* and update it with the following:
332332

333-
[!code-csharp[](./snippets/game1.cs?highlight=17-21,62-66,71-159,170)]
333+
[!code-csharp[](./snippets/game1.cs?highlight=17-21,60-64,69-157,168)]
334334

335335
The key changes made here are:
336336

0 commit comments

Comments
 (0)