The exercise here demonstrates making the enemy detect the player’s laser and move it sideways to save itself from getting destroyed.
The plan is as followed.
To detect the presence, the first requirement is to see which object should check the presence. If the enemy prefab does, by the time the presence is detected, it should be destroyed.
So, there must be another object that…
The exercise here demonstrates making the player magnetic towards free-flowing powerups by pressing the C key.
here is the implementation for the tasks above.
The exercise here demonstrates a way to make the enemy prefab destroy a powerup made for the player.
The plan to make this work is as followed.
The exercise here demonstrates rotating the enemy prefab after it reaches a nearby location to the player and then firing sideways.
Before moving ahead, please make sure you have a new enemy prefab and an associated laser/bullet prefab in place with basic components such as rigid body, box collider, etc.
The pseudo-code is as followed.
The exercise here demonstrates implementing a wavy movement of a projectile being fired from an enemy in a 2D game.
Before moving ahead, please make sure there is a separate enemy prefab and an associated projectile prefab in place.
The exercise here demonstrates a way of introducing a powerup that stops the player from firing for 5 seconds.
The spawn manager takes care of spawning powerup prefabs and the powerup script gives these prefabs speed and collision capabilities. Please make sure that there is a similar configuration at your end to follow along.
First, a prefab has to be created.
The article here demonstrates the implementation of the large pseudo-code written in the previous part.
A scriptable object gets created via a script. Go ahead and make a C# script, name it as per choice and then make two changes that will convert it into a scriptable object.
The exercise here demonstrates a solution that took a while to come to its full completion. The objective is to introduce a wave system that depicts game levels with each increment.
Please make sure that the previous articles written by myself contain the foundation building which is majorly used here to achieve the task at hand.
The solution is in two parts. The first one contains the journey to come to this solution and the second one contains the implementation.
Let us get to the problem first.
The game currently spawns infinite enemies until the player dies. An ideal game…
The exercise here demonstrates changing the text of the Text element in a UI placed in the Unity game.
Before going further into this, please go through the article here.
The process is extremely simple and shall not take more than 5 minutes to implement.
The exercise here demonstrates an implementation of additional enemy movement that originates from the left-end corner of the screen at an inclined angle, and upon reaching nearly halfway of the screen, it reclines to another angle to exit the window.
Before going further into this, kindly make sure that the enemy and spawn manager objects are in good standings since they are needed to add this feature here.
Here is the high-level pseudo-code.
Work in Progress.