|
|
|
|
 |
| Create a class to hold your game data and create your first game object - a player-controlled cannon that takes Xbox 360 controller or keyboard input. |
|
 |
Step 1 |
|
|
|
| Create a new GameObject class that defines your in-game objects, and create a cannon GameObject. |
|
|
|
|
|
Step 2 |
|
|
|
| Use the GamePad and Keyboard classes to take input to rotate the cannon, and clamp the input with MathHelper to keep it within bounds. |
|
|
|
|
|
Step 3 |
|
|
|
| Use an overloaded version of SpriteBatch.Draw to draw the cannon rotated based on player input. |
|
|
|
|
|
|
|