This repository was archived by the owner on Aug 27, 2022. It is now read-only.

Description
Jumping on the enemy hurts the player, not the enemy.
It seems the code assumes that on a collision, response.a will be the player and response.b will be the enemy. This is not always the case. Both the enemy and the player fire a collision response when calling me.collision.check(this), it seems the player fires one with response.a being itself and response.b being the enemy, and for the enemy it's the other way around.
Also, the enemy checks whether the player's falling flag is set, but it has been previously unset by the player's collision code, resulting in the enemy not being actually hurt.
The "platformer" example in the melonJS code seems to handle that better. Maybe the tutorial could take inspiration from that.