Advertisement
DaveVoyles

Rotation

Jun 28th, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1. class Ball {
  2.  
  3.    private Rectangle size;
  4.  
  5.     public ball()
  6.     {             ........
  7.             size = new Rectangle(0, 0, texture.Width, texture.Height);
  8.     }             ........
  9.  
  10.  
  11.     public Draw()
  12.     {
  13.             // New way. I have working rotation, but the ball doesn't change vectors.
  14.              spriteBatch.Draw(texture, resetPos, null, Color.White, RotationAngle, Origin, 1f,           SpriteEffects.None, 0);
  15.  
  16.              // Old way. But obviously no rotation.
  17.              spriteBatch.Draw(texture, size, Color.White);
  18.      }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement