Skip to content

Commit c7ea822

Browse files
committed
Correct spelling of added
1 parent 69fadad commit c7ea822

File tree

1 file changed

+1
-1
lines changed
  • articles/tutorials/building_2d_games/18_texture_sampling

1 file changed

+1
-1
lines changed

articles/tutorials/building_2d_games/18_texture_sampling/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ The key changes here are
164164
- The `_backgroundPattern` field was added to store a reference to the texture of the background pattern once its loaded.
165165
- The `_backgroundDestination` field was added to define the destination rectangle to draw the background pattern to.
166166
- The `_backgroundOffset` field was added to apply an offset to the source rectangle when rendering the background pattern to give it the appearance that it is scrolling.
167-
- The `_scrollSpeed` field was dded to set the speed at which the background pattern scrolls.
167+
- The `_scrollSpeed` field was added to set the speed at which the background pattern scrolls.
168168
- In `Initialize`, the initial offset of the background is set to [**Vector2.Zero**](xref:Microsoft.Xna.Framework.Vector2.Zero) and the background destination rectangle is set to the bounds of the screen.
169169
- In `LoadContent`, the *background-pattern* texture is loaded and stored in `_backgroundPattern`.
170170
- In `Update`, the X and Y offset for the background source rectangle is calculated by adjusting the based on the scroll speed multiplied by the delta time. Modulo division is then used to ensure that the new offset calculations remain within the width and height bounds of the background texture so that the wrap is seamless.

0 commit comments

Comments
 (0)