Let your Player Heal!!
Create a PowerUp that heals the player.
Similar to our Ammo PowerUp, we will need to add the PowerUp as a Spawnable object, make it collectible by the Player, and add functionality to the Player and UI once the PowerUp is collected.
Since we just limited Ammo give the Player a chance to recover
We need to create a new PowerUp that refills the ammo of the Player.
On collection of the PowerUp, refill ammo count and the UI.
We will need a Prefab to collect as well…
When the Player collects a shield power up, we will allow 3 hits on the shield before it is disabled.
We will need to add a life counter to our shield. This counter will start at 3 on collection of the shield. The shield currently expires with time…
Because Thrusters are not enough
Give your player the ability to go faster while they are pressing the Left-Shift key.
Sounds like we need to listen for a key press. If we detect that key press we need to add in a multiplier to adjust the speed…
So, we have pretty slick game with random speeds, and spawns, and power ups.
Let’s add a little more challenge by letting the enemy shoot back.
Let’s start by making an EnemyLaser Prefab.
Start with an empty GameObject and add a Laser Prefab to it. Position it inline with the…
Committing to git frequently is a good idea. In this commit round I discovered an oops. Out .gitignore file is setup to ignore the build and builds folder. However, we created our builds in there own folders under the project.
Let’s get our build setup.
First from Build Settings go to Player Settings. This allows you to change how to launch the compiled application. By default it is set to full screen. One thing we have not implemented yet is the exit command.
We need to change the Fullscreen Mode…
To add background music lets add an AudioSource to our Main Camera game object. Then drag the music_background asset to the AudioClip slot. When adding background music it is ok to attach it to a permanent object like the camera.
Unfortunately, gifs don’t share audio. …