|
|
|
|
 |
| Use a random number generator and a bit of math to create enemy UFOs that appear in random locations and fly across the screen. |
|
 |
Step 1 |
|
|
|
| Create and initialize an array of enemy GameObjects, and declare constants to use when randomly placing the enemies. |
|
|
|
|
|
Step 2 |
|
|
|
| Create an UpdateEnemies method that moves enemies across the screen and "kills" enemies that leave the screen. |
|
|
|
|
|
Step 3 |
|
|
|
| Add on to the UpdateEnemies method to regenerate enemies that have died, placing them randomly on the screen. |
|
|
|
|
|
Step 4 |
|
|
|
| Modify the Draw call to draw the enemy UFOs on the screen. |
|
|
|
|
|
|
|