LegendCutscene
┗> Cutscene > Class
A special cutscene class for Legend-style cutscenes.
Write an annotation here about how these cutscenes start!
Methods
LegendCutscene:musicWait(time: number)
Suspends the cutscene until the music reaches a certain runtime.
@param time — The song runtime to wait until before resuming the cutscene, in seconds.
Arguments:
| time: number | The song runtime to wait until before resuming the cutscene, in seconds. |
Returns:
| 1: any |
LegendCutscene:removeText()
Removes all currently active text objects from the cutscene.
LegendCutscene:setSpeed(speed: number)
Sets the typing speed of the legend text.
Default typing speed is 1.
@param speed — The speed, in characters typed per frame.
Arguments:
| speed: number | The speed, in characters typed per frame. |
LegendCutscene:slide(texture: string)
Adds a new picture slide to the legend.
@param texture — The path to the texture for the new slide.
@return slide — The sprite created for the new panel.
Arguments:
| texture: string | The path to the texture for the new slide. |
Returns:
| slide: Sprite | The sprite created for the new panel. |
LegendCutscene:text(text: string, pos: table|LegendCutscene.text_position)
Writes some text at the given coordinates on the screen.
@param text — The text to display.
@param pos — A table of the x and y coordinates to start writing the text at. See LegendCutscene.text_positions for a set of default text positions.
Arguments:
| text: string | The text to display. |
| pos: table|LegendCutscene.text_position | A table of the x and y coordinates to start writing the text at. See |
Returns:
| dialogue: DialogueText |
Fields
LegendCutscene.speed: number
The speed that newly created text will type at in the cutscene, in characters per frame.
LegendCutscene.text_positions: table
A table of preset positions for use with LegendCutscene:text().
Available positions: "far_left", "far_right", "left", "top_left",
"middle_bottom", "left_bottom", "far_left_bottom", "text_human",
"text_monster", "text_prince".