My journey becoming a Unity game developer: Enemy prototype for Galaxy Invaders

Enemy appearing randomly at the top of the screen on the X-axis after moving downward offscreen.
Enemy created as a prefab with a new material and script attached.
There are no Rigidbodies attached to the Player, Enemy, and Laser objects.
Enemy will move down at 4 meters per second.
Enemy moving down 4 meters per second.
Finding the boundaries to spawn when going off the bottom of the screen and limiting movement on the sides.
Enemy to reappear at different X-axis positions when moving off the bottom of the screen.
Enemy reappears at random X-axis positions after moving off the bottom of the screen.
RandomX variable created to make code simpler.
Enemy still appearing randomly on the X-axis using the new randomX variable.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store