rotation functioning in rectangle renderer.

This commit is contained in:
2019-02-22 02:17:50 -06:00
parent 8d5435ad6c
commit 5c0d678076
2 changed files with 10 additions and 8 deletions

View File

@@ -99,20 +99,22 @@ namespace CameraTest
base.Update(gameTime);
}
float angleDeg = 0;
/// <summary>
/// This is called when the game should draw itself.
/// </summary>
/// <param name="gameTime">Provides a snapshot of timing values.</param>
protected override void Draw(GameTime gameTime)
{
angleDeg++;
if (angleDeg > 360) angleDeg = 0;
GraphicsDevice.Clear(Color.Black);
rr.Begin(true);
rr.Draw(25, 25, 70, 70, Color.Purple);
rr.End();
rr.Begin(false);
rr.Draw(75, 75, 70, 70, Color.Green);
rr.Draw(75, 75, 70, 70, Color.Green, MathHelper.ToRadians(angleDeg));
rr.End();
base.Draw(gameTime);
}