Skip to content

Extended from Sprite Character

This class is used for the player character and for npcs

Properties

boolean Anchored

number Health

The amount of health of the character

number MaxHealth

The maximum amount of health of the character

number WalkSpeed

The walk speed of the character

number JumpPower

The jump power of the character

boolean IsJumping

Set to true when the character is jumping

Methods

void UpdateHealth(Health: number)

Updates the amount of health of the character

void Jump(jumpPower: number?)

The character jumps with the provided jump power, if none is provided it will use the JumpPower property as value

void MoveTo(target: Vector2)

The character walks directly to the provided position

Events

There is no events for this class