Hey guys,
After getting in the fireball and touchscreen I thought what was next? I decided to create a health system for the player as well as picking up gems which will add to the players score. I then thought that the player needs to do die once he has taken X amount of hits. I also needed there to be a point where the level ends.
For the end of the level I use a chest to signify that it is now the end of the level. Once the player enters a trigger then it will remove the dragon, stop the player from moving, and make the chest open.
Similar code is used for picking up a gem, if the player walks into a trigger then it will add one to a variable which is displayed in the HUD. With the health I have a tag on the fireball called ‘Enemy’ and if this collides with the player it will subtract 1 from the players health.
Thanks and lets continue.