My journey becoming a Unity game developer: Enemies attacks Player

Enemies shooting the Player, but not each other.
Enemy Laser created using a Prefab Variant of the Player’s Laser object.
Enemy Laser container created within the Enemy object.
Enemy Laser prefab added to the Enemy Laser object as a child.
Duplicated the Enemy Laser prefab and positioned it to its parent.
Enemy Lasers positioned to shoot out in front of the Enemy’s ship.
Changed the Enemy Lasers name.
Enemy Laser object turned into a prefab, and deleted from Hierarchy.
IsEnemyLaser variable created to check if it’s False.
MoveUp() method created to move the Player’s lasers in an upward direction.
MoveDown() method to move the Enemy’s lasers in a downward direction.
AssignEnemyLaser() method created to change isEnemyLaser to True, and deal damage to the Player.
EnemyFireLaser() method created to assign when the Enemy can shoot lasers.
EnemyMovement() method created to move the enemies in a downward direction.
Enemy Layers added to the Enemy and Enemy Laser prefabs with Physics matrix turned off.

--

--

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