Commits

Tim Eicher committed 81f94a8

Fixed the issue with the ship being drawn off of the screen.

  • Participants
  • Parent commits 1e4a960

Comments (0)

Files changed (1)

File ShooterTutorial/Animation.cs

             sourceRect = new Rectangle(currentFrame * FrameWidth, 0, FrameWidth, FrameHeight);
 
             // Grab the frame in the image strip by multiplying the currentFrame index by the frame width.
-            destinationRect = new Rectangle((int) Position.X - (int) (FrameWidth * scale) / 2,
-                                            (int) Position.Y - (int) (FrameHeight * scale) / 2,
+            destinationRect = new Rectangle((int) Position.X,
+                                            (int) Position.Y,
                                             (int) (FrameWidth * scale),
                                             (int) (FrameHeight * scale));
         }