Cutscene

new Cutscene()

Cutscene represents a sequence of scripted events.

Classes

Cutscene

Methods

addStep(stepFn) → {Cutscene}

Add a step to the cutscene.

Parameters:
NameTypeDescription
stepFnfunction

Function to execute (receives context, can return wait time).

Returns:
Type: 
Cutscene

nextStep()

Advance to next step manually.

pause()

Pause the cutscene.

play(context)

Start the cutscene.

Parameters:
NameTypeDescription
contextObject

Context object passed to step functions.

resume()

Resume the cutscene.

skip()

Skip to end of cutscene.

update(deltaTime)

Update the cutscene.

Parameters:
NameTypeDescription
deltaTimenumber

wait(duration) → {Cutscene}

Add a wait step.

Parameters:
NameTypeDescription
durationnumber

Wait time in seconds.

Returns:
Type: 
Cutscene