Member-only story
Unity2D DevLog 13— They Shoot Back!
Dodging enemies in the game could become a little too easy and repetitive. Therefore, I took a step further in trying to vary the style of gameplay. Time to create a new enemy!
Objective:
Provide enemy characters with the ability to shoot back.
How I went about it:
This shooting mechanic was not difficult to add. I had most of the necessary components already created. All I had to add was a Script to handle the shooting mechanic.
But first, I had to adapt an enemy sprite to make the new enemy. It seems like a good idea to differentiate enemies so that the player can react to them appropriately. All I did for this one was to re-color the sprite. I like how it looks tho.
Now that the player can identify a threat, it’s time to create the Shooting Script. This script will allow the alien to detect the player and fire a bullet.