26/04/25 Adding projectiles and health functionality
As stated in my previous development log, I said i would be working on the projectiles and scoring system in my game. I was able to implement the powers but i still could not figure out how to add the distance counter. Therefore, i will figure that one out later. For now, the way i implemented the projectiles. First, I put all the hazard objects into a group like so:
I then began integrating the bullet mechanics from my asteroids game into this game. My asteroids game was a great basis for implementing the spawning of projectiles however there was never a cool down system implemented into it, so i decided that id finally add one here. First what i did was create a timer which is set at the beginning of the level.
then i would have to set the cooldown to whatever amount it needs to wait for the specific dragon, the green dragon would have a 2 second cooldown but the water dragon will have a faster cooldown to create a sense of differentiation.
After setting up the projectile functionality I was then able to move on to adding health to each of the different dragons. I fist added the health extension and attached it to all the dragons in all the scenes:
I then, with the help of heath bar assets from the asset store, began integrating them into the players healthbar. i made it so each heart is linked to the amount of health the dragon has. So if the dragon has a max of 4 health, the 4th heart on the healthbar will get deleted if the dragon's health equals 3. the health is directly effected by collisions made by the player and hazards. and of course when all the health is gone, the dragon will die and the player will be sent to the select screen again.
all together my prototype looks like this:
anyways thats all for now. Kieran signing out o7
Comments
Comments disabled.