Skip to content

Commit 56ee949

Browse files
committed
Fix all link errors
1 parent c76a79e commit 56ee949

File tree

6 files changed

+28
-27
lines changed

6 files changed

+28
-27
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ In MonoGame, we can create these animations by cycling through different regions
1616

1717
By drawing each frame sequentially over time, we create the illusion that the bat is flapping its wings. The speed at which we switch between frames determines how smooth or rapid the animation appears.
1818

19-
In this chapter, we'll build off of the `Sprite` class we created in [Chapter 09](../09_the_sprite_class/) to create an `AnimatedSprite` class we can use to bring animations to life.
19+
In this chapter, we'll build off of the `Sprite` class we created in [Chapter 09](../09_the_sprite_class/index.md) to create an `AnimatedSprite` class we can use to bring animations to life.
2020

2121
## The Animation Class
2222

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ When you play a game, you need ways to control what's happening; using a keyboar
88
- [**Keyboard**](xref:Microsoft.Xna.Framework.Input.Keyboard): Detects which keys are being pressed.
99
- [**Mouse**](xref:Microsoft.Xna.Framework.Input.Mouse): Tracks mouse movement, button clicks, and scroll wheel use.
1010
- [**GamePad**](xref:Microsoft.Xna.Framework.Input.GamePad): Manages controller input like button presses and thumbstick movement.
11-
- [**TouchPanel**](xref:Microsoft.Xna.Framework.Input.TouchPanel): Manages touch input on devices with a touch panel such as mobile phones and tablets.
11+
- [**TouchPanel**](xref:Microsoft.Xna.Framework.Input.Touch.TouchPanel): Manages touch input on devices with a touch panel such as mobile phones and tablets.
1212

1313
Each of these input types has a `GetState` method that, when called, checks what is happening with that device at that moment. Think of it like taking a snapshot; when you call `GetState`, MonoGame looks at that exact moment to see which buttons are pressed, where the mouse is, or how the controller is being used.
1414

@@ -655,7 +655,7 @@ In the next chapter, we'll learn how to track previous input states to handle si
655655
<details>
656656
<summary>Question 7 Answer</summary>
657657

658-
> Touch input can handle multiple simultaneous touch points through the [**TouchCollection**](Microsoft.Xna.Framework.Input.Touch.TouchCollection), while mouse input only tracks a single cursor position. This allows touch input to support features like multi-touch gestures that aren't possible with a mouse.
658+
> Touch input can handle multiple simultaneous touch points through the [**TouchCollection**](xref:Microsoft.Xna.Framework.Input.Touch.TouchCollection), while mouse input only tracks a single cursor position. This allows touch input to support features like multi-touch gestures that aren't possible with a mouse.
659659
</details><br />
660660

661661
8. What are the different states a [**TouchLocation**](xref:Microsoft.Xna.Framework.Input.Touch.TouchLocation) can have and what do they indicate?

articles/tutorials/building_2d_games/12_input_management/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ We use vibration in gamepads to provide haptic feedback to the player. The [**G
590590
private TimeSpan _vibrationTimeRemaining = TimeSpan.Zero;
591591
```
592592

593-
Recall from the [previous chapter](../09_handling_input/index.md#gamepad-input) that a [**PlayerIndex**](xref:Microsoft.Xna.Framework.PlayerIndex) value needs to be supplied when calling [**Gamepad.GetState**](xref:Microsoft.Xna.Framework.Input.GamePad.GetState(Microsoft.Xna.Framework.PlayerIndex)). Doing this returns the state of the gamepad connected at that player index. So we'll need a property to track the player index this gamepad info is for.
593+
Recall from the [previous chapter](../11_handling_input/index.md#gamepad-input) that a [**PlayerIndex**](xref:Microsoft.Xna.Framework.PlayerIndex) value needs to be supplied when calling [**Gamepad.GetState**](xref:Microsoft.Xna.Framework.Input.GamePad.GetState(Microsoft.Xna.Framework.PlayerIndex)). Doing this returns the state of the gamepad connected at that player index. So we'll need a property to track the player index this gamepad info is for.
594594

595595
```cs
596596
/// <summary>
@@ -904,9 +904,9 @@ Now that we have our input management system complete, let's update our game to
904904
Components.Add(_input);
905905
```
906906

907-
4. In [**Update**](xref:xref:Microsoft.Xna.Framework.Game.Update(Microsoft.Xna.Framework.GameTime)), remove the `if` statement that checks for the gamepad back button or keyboard escape key being pressed and then calls exit. We're going to move this to the individual handle input methods in a moment.
907+
4. In [**Update**](xref:Microsoft.Xna.Framework.Game.Update(Microsoft.Xna.Framework.GameTime)), remove the `if` statement that checks for the gamepad back button or keyboard escape key being pressed and then calls exit. We're going to move this to the individual handle input methods in a moment.
908908

909-
5. In [**Update**](xref:xref:Microsoft.Xna.Framework.Game.Update(Microsoft.Xna.Framework.GameTime)) move the `base.Update(gameTime)` call from being the last line of the method to the first line of the method. We do this because game components are updated during the `base.Update(gameTime)` call and we want to ensure that input is updated before we start handling input checks.
909+
5. In [**Update**](xref:Microsoft.Xna.Framework.Game.Update(Microsoft.Xna.Framework.GameTime)) move the `base.Update(gameTime)` call from being the last line of the method to the first line of the method. We do this because game components are updated during the `base.Update(gameTime)` call and we want to ensure that input is updated before we start handling input checks.
910910

911911
6. Update the `HandleKeyboardInput` method to use the new `InputManager`:
912912

articles/tutorials/building_2d_games/13_collision_detection/index.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ MonoGame provides the [**Rectangle**](xref:Microsoft.Xna.Framework.Rectangle) st
9797

9898
| Property | Type | Description |
9999
|-------------------------------------------------------------|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
100-
| [**Bottom**](xref:Microsoft.Xna.Framework.Rectangle.Bottom) | `int` | Returns the y-coordinate location of the bottom edge of the rectangle. This is equal to [**Rectangle.Y](xref:Microsoft.Xna.Framework.Rectangle.Y) plus the height of the rectangle. |
101-
| [**Left**](xref:Microsoft.Xna.Framework.Rectangle.Left) | `int` | Returns the x-coordinate location of the left edge of the rectangle. This is equal to [**Rectangle.X**](Microsoft.Xna.Framework.Rectangle.X). |
100+
| [**Bottom**](xref:Microsoft.Xna.Framework.Rectangle.Bottom) | `int` | Returns the y-coordinate location of the bottom edge of the rectangle. This is equal to [**Rectangle.Y**](xref:Microsoft.Xna.Framework.Rectangle.Y) plus the height of the rectangle. |
101+
| [**Left**](xref:Microsoft.Xna.Framework.Rectangle.Left) | `int` | Returns the x-coordinate location of the left edge of the rectangle. This is equal to [**Rectangle.X**](xref:Microsoft.Xna.Framework.Rectangle.X). |
102102
| [**Right**](xref:Microsoft.Xna.Framework.Rectangle.Right) | `int` | Returns the x-coordinate location of the right edge of the rectangle. This is equal to [**Rectangle.X**](xref:Microsoft.Xna.Framework.Rectangle.X) plus the width of the rectangle. |
103103
| [**Top**](xref:Microsoft.Xna.Framework.Rectangle.Top) | `int` | Returns the y-coordinate location of the top edge of the rectangle. This is equal to [**Rectangle.Y**](xref:Microsoft.Xna.Framework.Rectangle.Y). |
104104

@@ -184,8 +184,9 @@ A blocking collision response is the most basic response which just prevents the
184184

185185
1. Store the location of an object calculating the new location to move it to.
186186
2. Check if it is overlapping an object at the new location:
187-
- If it is overlapping, then set the position to the the position before it was moved.
188-
- If it is not overlapping, set the position to the new calculated position.
187+
188+
- If it is overlapping, then set the position to the the position before it was moved.
189+
- If it is not overlapping, set the position to the new calculated position.
189190

190191
For example:
191192

@@ -226,7 +227,7 @@ _spriteLocation = newLocation;
226227
Sometimes, instead of preventing an object from moving onto another object, we want to ensure an object remains contained within a certain bounding area. MonoGame also provides the [**Rectangle.Contains**](xref:Microsoft.Xna.Framework.Rectangle.Contains(Microsoft.Xna.Framework.Rectangle)) method that we can use to determine this. [**Rectangle.Contains**](xref:Microsoft.Xna.Framework.Rectangle.Contains(Microsoft.Xna.Framework.Rectangle)) can check if any of the following are completely contained within the bounds of the rectangle;
227228

228229
- [**Point**](xref:Microsoft.Xna.Framework.Point)
229-
- [**Rectangle**](xref:Microsof.Xna.Framework.Rectangle)
230+
- [**Rectangle**](xref:Microsoft.Xna.Framework.Rectangle)
230231
- [**Vector2**](xref:Microsoft.Xna.Framework.Vector2)
231232

232233
For example, if we wanted to perform a blocking collision response that ensure a sprite remained contained within the bounds of the game screen:
@@ -401,7 +402,7 @@ For our simple game with just two objects, this optimization isn't necessary. Ho
401402

402403
## The Circle Struct
403404

404-
For our game, we are going to implement circle based collision detection. MonoGame does not have a `Circle` struct to represent a circle like it does with [**Rectangle**](xref:Microsoft.Xna.Framework.Rectangle). Before we can perform circle collision, we will need to create our own.
405+
For our game, we are going to implement circle based collision detection. MonoGame does not have a `Circle` struct to represent a circle like it does with [**Rectangle**](xref:Microsoft.Xna.Framework.Rectangle). Before we can perform circle collision, we will need to create our own.
405406

406407
In the *MonoGameLibrary* project, add a new file named *Circle.cs*. Add the following code as the foundation of the `Circle` struct:
407408

@@ -797,7 +798,7 @@ Running the game now, you'll see the bat moving automatically and bouncing off t
797798
|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
798799
| **Figure 11-6: The bat is assigned a random velocity and moves automatically, bouncing off the edges of the screen if it collides with them** |
799800
800-
Finally, let's add a trigger response when the slime "eats" the bat, causing the bat to respawn at a random location on the screen with a new random velocity. In [**Update**](xref:xref:Microsoft.Xna.Framework.Game.Update(Microsoft.Xna.Framework.GameTime)) after we set the new position for the bat, add the following
801+
Finally, let's add a trigger response when the slime "eats" the bat, causing the bat to respawn at a random location on the screen with a new random velocity. In [**Update**](xref:Microsoft.Xna.Framework.Game.Update(Microsoft.Xna.Framework.GameTime)) after we set the new position for the bat, add the following
801802
802803
```cs
803804
if (slimeBounds.Intersects(batBounds))
@@ -909,4 +910,4 @@ In the next chapter, we'll start exploring audio to add sound effects when a col
909910
<summary>Question 6 Answer</summary>
910911

911912
> We store the previous position so that if a collision occurs after movement, we can reset the object back to its last valid position. This prevents objects from moving through each other by undoing any movement that would cause overlap.
912-
</details><br />
913+
</details><br />

articles/tutorials/building_2d_games/14_soundeffects_and_music/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ The key characteristics of sound effects are:
6060

6161
### Music
6262

63-
The [**Song**](xref:Microsoft.Xna.Framework.Audio.Song) class handles longer audio pieces like background music. The key characteristics of songs are:
63+
The [**Song**](xref:Microsoft.Xna.Framework.Media.Song) class handles longer audio pieces like background music. The key characteristics of songs are:
6464

6565
- Streamed from storage rather than loaded into memory.
6666
- Only one song can be played at a time.
@@ -91,7 +91,7 @@ Adding audio files can be done through the content pipeline, just like we did fo
9191
The processor that are available for audio files file:
9292

9393
- **Sound Effects**: Processes the audio file as a [**SoundEffect**](xref:Microsoft.Xna.Framework.Audio.SoundEffect). This is automatically selected for *.wav* files.
94-
- **Soung**: Processes the audio file as a [**Song**](xref:Microsoft.Xna.Framework.Audio.Song). This is automatically selected for *.mp3*, *.ogg*, and *.wma* files.
94+
- **Soung**: Processes the audio file as a [**Song**](xref:Microsoft.Xna.Framework.Media.Song). This is automatically selected for *.mp3*, *.ogg*, and *.wma* files.
9595

9696
| ![Figure 12-2: MGCB Editor properties panel showing Sound Effect content processor settings for .wav files** | **Figure 12-3: MGCB Editor properties panel showing Song content processor settings for .mp3 files](./images/sound-effect-properties.png) | ![Figure 12-3: MGCB Editor properties panel showing Song content processor settings for .mp3 files](./images/song-properties.png) |
9797
| :---: | :---: |
@@ -110,7 +110,7 @@ SoundEffect soundEffect = Content.Load<SoundEffect>("soundEffect");
110110

111111
### Loading Music
112112

113-
Loading music is similar, only we specify the [**Song**](xref:Microsoft.Xna.Framework.Audio.Song) type instead.
113+
Loading music is similar, only we specify the [**Song**](xref:Microsoft.Xna.Framework.Media.Song) type instead.
114114

115115
```cs
116116
Song song = Content.Load<Song>("song");
@@ -182,7 +182,7 @@ MediaPlayer.Play(_backgroundMusic);
182182
```
183183

184184
> [!IMPORTANT]
185-
> While [**SoundEffect**](xref:Microsoft.Xna.Framework.Audio.SoundEffect) instances can be played simultaneously, trying to play a new [**Song**](xref:Microsoft.Xna.Framework.Audio.Song) while another is playing will stop the current song in the best case, and in the worst case cause a crash on some platforms. In the example above, the state of the media player is checked first before we tell it to play a song. Checking the state first and stopping it manually if it is playing is best practice to prevent potential crashes.
185+
> While [**SoundEffect**](xref:Microsoft.Xna.Framework.Audio.SoundEffect) instances can be played simultaneously, trying to play a new [**Song**](xref:Microsoft.Xna.Framework.Media.Song) while another is playing will stop the current song in the best case, and in the worst case cause a crash on some platforms. In the example above, the state of the media player is checked first before we tell it to play a song. Checking the state first and stopping it manually if it is playing is best practice to prevent potential crashes.
186186
187187
## Audio Management
188188

0 commit comments

Comments
 (0)