JumpingSystem Class
System responsible for handling jumping. It handles regular jumping, wall jumping and double jumping. All jumping requires that the entity is a valid dynamic physics object, also the GroundedMovement and the Jumping components are required. Other than that, wall jumping requires the WallJumping component and double jumping requires the DoubleJumping component. Jumping is executed via the input and AI systems triggering the 'jump' event. Jumps can be performed only immediately when the 'jump' event is triggered, so f.e. holding the 'jump' button won't make the entity constantly jump. The jump strength is modified by the JumpPowerSpellEffects, if present. This system plays animations. The animations played are 'jumpLeft', 'jumpRight' for regular jumps, 'wallJumpLeft' when an entity jumps off of a wall on the right, for a wall on the left the 'wallJumpRight' animation is played. Double jumping plays the 'doubleJumpLeft' and 'doubleJumpRight' animations.
Constructor
JumpingSystem
-
entitySystemManager
-
inputSystem
-
aISystem
-
physicsSystem
-
collisionMasks
Parameters:
-
entitySystemManager
ManagerThe entity system manager whose entities this system will be working on.
-
inputSystem
KeyboardInputSystem -
aISystem
AISystem -
physicsSystem
PhysicsSystem -
collisionMasks
ObjectAn object holding bit masks used for determining collision categories.