|
|
|
|
 |
| Use the random number generator and linear interpolation math to create regenerating enemy UFOs that fly across the screen. |
|
 |
Step 1 |
|
|
|
| Instantiate a random number generator, and create and fill an enemy GameObject array to represent the enemy UFOs. |
|
|
|
|
|
Step 2 |
|
|
|
| Start an UpdateEnemies method that will move the enemy GameObjects across the screen by their velocity each frame. |
|
|
|
|
|
Step 3 |
|
|
|
| Create constants to constrain your random number generator, then modify the UpdateEnemies method to randomly place your enemies using random numbers and linear interpolation. |
|
|
|
|
|
Step 4 |
|
|
|
| Draw the enemy UFOs on screen using the DrawGameObject method. |
|
|
|
|
|
|
|