Reflection #15

This week in my project I have been working on tweaking my enemy health system and have adjusted my enemy scripts so that they have their own damage values, for my slower moving enemies they have a higher damage value and for my fast enemies they have a lower damage value.

I have also finished adding in my goblin as they are now capable of spawning in from the right side of the screen as I made a similar enemy script with a different spawn point location

Here is my updated script of the tower health system and how it responds to enemy collision.

Update to tower health script.PNG

From the public void of OnTriggerEnter2d there are three if statements, for each of the if statements they compare the tag of goblin,cyclopes and dragons as each of my different enemy sprites will have a different tag to make them different to each of the other enemies as oppose to calling each of them enemy.

When the enemy hits the tower it will compare the tag for example the cyclopes will hit the tower its tag will be compared and the damage value from the if statement of 2 will be subtracted from its health from the if statement of – 2 from the total health at the time, if the health is nine and it subtracts 2 the total health becomes 7.

I have not found anything in particular which I have found to be challenging or confusing anyway as my tasks have been very straight forward in what I have been achieving this week.

Overall this is one of my last weeks before the end of the project so from now on I will not be adding anything major to the game at this point, instead I will choose to just keep on making small adjustments to the game such as balancing the enemy damage and health of my tower and fix any bugs I may come across for the next couple of weeks.