The Draw()
method consists of a single call to the SpriteBatch.Draw()
method, using an overload of the method that allows for rotation and scaling.
Because we are specifying a rotation, we need to identify a center point for the rotation to be based around (new Vector2(frameWidth / 2, frameHeight / 2)
. Instead of specifying a destination rectangle, we specify a vector that points to the center of the area the object will occupy on the screen (the Center
property of the Sprite class).
3.135.200.211