Extended from Sprite Character¶
This class is used for the player character and for npcs
Properties¶
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
Methods¶
Character Constructor(
)¶
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¶
Name |
Description |
---|---|