Player

┗> Character > Object > Class


The character controlled by the player when in the Overworld.


Constructor


Player(chara: any, x: any, y: any)

Arguments:

chara: any
x: any
y: any




Methods


Player:alignFollowers(facing: string?, x: number?, y: number?, dist: number?)

Aligns the player's followers' directions and positions.

Arguments:

facing: string?

The direction every character should face (Defaults to player's direction)

x: number?

The x-coordinate of the 'front' of the line. (Defaults to player's x-position)

y: number?

The y-coordinate of the 'front' of the line. (Defaults to player's y-position)

dist: number?

The distance between each follower.



Player:beginSlide(last_state: any, in_place: any, lock_movement: any)

Arguments:

last_state: any
in_place: any
lock_movement: any




Player:endSlide(next_state: any)

Arguments:

next_state: any




Player:getCurrentSpeed(running: any)

Arguments:

running: any

Returns:

1: integer




Player:getDebugOptions(context: ContextMenu)

Arguments:

context: ContextMenu

Returns:

1: ContextMenu






Player:interpolateFollowers()

Adds all followers' current positions to their movement history.









Player:onAdd(parent: World)

Arguments:

parent: World

The World Object manages everything relating to the overworld in Kristal.
A globally available instance of World is stored in Game.world.



Player:onRemove(parent: World)

Arguments:

parent: World

The World Object manages everything relating to the overworld in Kristal.
A globally available instance of World is stored in Game.world.



Player:onRemoveFromStage(stage: Object)

Arguments:

stage: Object

The base class of all objects in Kristal.
When added to the stage, an object will be updated and rendered.





Player:setActor(actor: any)

Arguments:

actor: any


Player:setState(state: any, : unknown)

Arguments:

state: any
: unknown













Undocumented



















































Player.slide_sound: love.Source

A Source represents audio you can play back.

You can do interesting things with Sources, like set the volume, pitch, and its position relative to the listener. Please note that positional audio only works for mono (i.e. non-stereo) sources.

The Source controls (play/pause/stop) act according to the following state table.

Open in Browser