Each of the enemies that appear in the game will function differently to give the gameplay experience much needed variety. As such, theya re all coded differently, their functions dictated usually to where the player is positioned.
The first enemy created for this game is the Gunk, who worls similarly to a Goomba from various Mario games, walking left and right, not being a significant threat.
This code means that the Gunk will cause damage to the player if you come into contact with it.
This is the code used for moving the Gunk left and right in a simple pattern.
This code dictates the Encroacher to move close when the player is 7 tiles or less distance.
For each of the last areas in each level, I have implemented a trigger that will move the player into the boss encounter before it will appear, before the boss will show up to initiate the fight. After dealing enough damage to the boss, they will disappear, and the player can move on to the end of the stage without incident.
No comments:
Post a Comment