Imps patrol on waypoints that are created on the shadow. The shadow is created at runtime (via our pseudoshadow class) which means the waypoints are created at runtime. The player has the ability to kill the imps only by moving the blocks that are casting the shadow in which the imps are living. When the player moves a shadow-casting platform and casts light ont he imps, the imps will move to the shadow as soon as possible. This is achieved by moving the waypoints along with shadows; there is a shadow game object and the waypoints are its children. Imps die when they are outside the shadow for about 3 seconds.
Whenever the player enters a shadow inhabited by imps, those imps rush towards the player. As they damage the player, the imps evolve, growing larger and gaining features ont heir path to becoming fiends.
Shadow fiends are fully-evolved creatures that are able to travel into light. To attack the player, they throw the much smaller imps from a distance and try to grab the player's shadow when they are near.
Fiends also patrol on waypoints, but their waypoints are not created dynamically. They have four attack ranges: Player Detection Range, Throw Projectile Range, Player in Close Range, and Melee range.
Each fiend watches the player constantly. It keep checking if the player is in detection range. If they are, the fiend can try to move closer to the throwing projectile range. Once it is inside the throw range, it will start throwing the imps at the player. If the player is close enough to the fiend, it will change its attacking mode to melee. It will try to move to the melee range and strike the player directly.
MAIN DATA STRUCTURES
We used lists so that we were able to add elements used dynamically to insert waypoints and handled the case in which if the player combines two shadows, the imps will patrol on both the shadows by adding the two groups of waypoints on both shadows to the waypoint list
Arrays were used for storing game objects that were already there, and for storing different sound effects (player damage, enemy noises, etc)