Class: Character

Character()

Represents the character in the game.

Constructor

new Character()

Creates an instance of Character.
Source:

Methods

animate()

Sets up the animation intervals for the character.
Source:

characterMovements()

Handles the character's movements based on keyboard input.
Source:

checkIdleState(currentTime)

Checks and updates the idle state of the character.
Parameters:
Name Type Description
currentTime number The current time in milliseconds.
Source:

deadAnimation()

Handles the dead animation of the character.
Source:

idleAnimation()

Handles the idle animation of the character.
Source:

stateAnimations()

Handles the state animations of the character.
Source:

updateIdleState(isIdle)

Updates the idle state of the character.
Parameters:
Name Type Description
isIdle boolean Indicates if the character is idle.
Source:

updateJumpAnimation()

Updates the jump animation of the character .
Source: