
- Add a code to reset “maxSpawnRateInSeconds” to 5
- Refer to “GameManager” Script



- Claim “Speed” variable for the speed of “Star”
- In “Update()” method
- Get, Change and Set “transform.position” of “Star”, this script is attached to
- in “if” statement,
- if y position of “Star” goes down below the screen, change the position of “Star” on the top with x position random


- Claim “MaxStars” variable for the number of Stars
- Create “Color” Array for “Star”
- In “Start()” method
- Get the Scree
- In “for” Loop,’
- Instantiate “star”
- Get Component “SpriteRenderer” to Star, instantiated from the prefab
- Change “Color ” property “”of “SpriteRenderer”
- color is changed with the calculation “[i % starColor.Length]”
- Set the position of “Star” randomly
- Set the speed with Random.value (generating a value between 0.0 and 1.0)
- Set the position of Star in the position of “StarGenerator”












- Claim “speed” variable for “Planet” speed
- Claim “moving” as “Flag”
- Claim the Screen as local variable
- In “Awake()”
- Set the Flag to false
- Set the screen
- In “Update()”
- if “Planet” is not moving,
- Change the position of Planet until the bottom of the screen
- change the flag to false
- In “ResetPostion()” method
- Set the position of “Planet” in the top of the screen with the x position random

- Claim an Array of Planets as public
- Create a Queue to hold “Planet”
- In “Start()” method
- Enqueue the planets in the queue
- Invoke “MovingPlanetDown” every 20seconds
- Create a Function, “EnqueuePlanets()”,
- Create a “foreach” loop
- if a planet’s position is below the screen and planet is not moving
- Reset the Planet’s position by using “ResetPosition()” method of “Planet” class
- Enqueue the disappearing planet in the Queue
- if a planet’s position is below the screen and planet is not moving
- Create a “foreach” loop
- Create a Function, “MovePlanetDown”
- Put “EnqueuePlanet()” method to collect Planets
- Get a Planet from the queue by using “Dequeue()”
- Get Component of “Planet” to set the flag to true








