Supplies play data to decide and gameplay screens. More...
| Import Statement: | import RhythmGameQml |
Declare required property GameplayContext gameplay on the screen root. The game supplies the object when it creates decide and passes the same object to gameplay. Every gameplay theme must support single charts and courses.
Bind to chartData and players so the display follows course stages. Do not keep using a Player from an earlier stage. Pass the context to StandardDecideFlow::gameplay or StandardGameplayFlow::gameplay for standard input and transitions. The game owns the context and its play objects; themes must not destroy them.
StandardGameplayFlow calls start, finishStage, nextStage and finishCourse for you. Call these methods yourself only when replacing that flow. Finishing saves scores; opening a result screen is a separate operation described in Screen navigation.
arenaActive : bool |
Reports whether the Arena session still presents this runner as its active gameplay. Use it for Arena targets and standings. It is independent of the theme's overlays and becomes false when play ends or the session releases the round.
bga : var |
Provides the current BGA container. It is initially null while the stage loads.
chartData : ChartData |
Describes the current chart. It keeps the last stage after the course finishes.
charts : list<ChartData> |
Contains chart metadata in stage order. A single chart has one entry.
course : var |
Contains the course definition, or undefined for a single chart. Check if (gameplay.course) before using course details. The current chart uses the same interface in either case.
coursePlayers : list<CoursePlayer> |
Contains combo state for the whole course, in player order. The list is empty for a single chart.
inputMapping : list<int> |
Maps physical BMS input to gameplay columns. The game checks the mapping and keeps it between course stages. Moving a lane visually does not change this mapping. Keep the default unless you intend to change which input controls each column.
isArena : bool |
True when play belongs to Arena. This value stays fixed. Arena owns the play objects and controls the shared start time. Use arenaActive to check whether the session is still presenting this round.
keymode : int |
Gives the keymode used for play, including changes made by play options.
players : list<Player> |
Contains one Player for solo or double play, or two for local battle. Each Player supplies a profile, notes, state, live score and timing. There is no null second entry in solo play. The list and chart metadata update together after the next course stage has been installed.
stageCount : int |
Gives the number of stages. A single chart has one stage.
stageIndex : int |
Gives the current stage index, starting at zero. It stays at the last stage after completion.
status : int |
The current stage status: ChartRunner.Loading, ChartRunner.Ready, ChartRunner.Running or ChartRunner.Finished.
CourseResultContext finishCourse() |
Saves the course summary after the final stage result exists. Returns the CourseResultContext, or null if the course is not ready to finish. Repeated successful calls return the same summary. Use globalRoot.openCourseResult(result) to display it.
ResultContext finishStage() |
Finishes and saves the current stage, returning its ResultContext. Repeated calls for that stage return the same context without saving again. Returns null while loading or if no result can be produced. Use globalRoot.openResult(result) to display a successful result.
bool nextStage() |
Advances a course after finishStage has produced its result. Returns true if the next stage was installed, or false for the final stage, a single chart, or an unavailable transition. Bind to chartData and players to follow the new stage.
bool start() |
Requests play after the stage is ready. Returns false if the stage is not Ready, already has a result, or is handling another lifecycle operation. In Arena, an accepted request waits for the shared start time; true does not mean notes have started moving yet.