You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The `_slime` and `_bat` members were changed from `TextureRegion` to `Sprite`.
80
-
- In [**LoadContent**](xref:Microsoft.Xna.Framework.Game.LoadContent) the `_slime` and `_bat` sprites are now created using the new `TextureAtlas.CreateSprite` method.
80
+
- In [**LoadContent**](xref:Microsoft.Xna.Framework.Game.LoadContent)
81
+
- The `_slime` and `_bat` sprites are now created using the new `TextureAtlas.CreateSprite` method.
82
+
- Both the `_slime` and `_bat` sprites are given a scale of 4.0f.
81
83
- In [**Draw**](xref:Microsoft.Xna.Framework.Game.Draw(Microsoft.Xna.Framework.GameTime)), the draw calls were updated to use the `Sprite.Draw` method.
82
84
83
85
Running the game now will produce the same result as in the previous chapter.
@@ -86,6 +88,9 @@ Running the game now will produce the same result as in the previous chapter.
|**Figure 8-1: The slime and bat sprites being rendered in the upper-left corner of the game window**|
88
90
91
+
> [!NOTE]
92
+
> Notice how even though we increased the scale of both sprites, the bat sprite is still only 10px to the right of the bat. This is because the `Width` property we created for the `Sprite` class takes into account the scale factor of the sprite as well.
93
+
89
94
Try adjusting the various properties available for the slime and the bat sprites to see how they affect the rendering.
0 commit comments