|
RhythmGame 1.4.3
|
A player of a chart. More...
#include <ChartRunner.h>


Signals | |
| void | positionChanged (double delta) |
| void | beatPositionChanged (double delta) |
| void | elapsedChanged (int64_t delta) |
| void | bpmChanged () |
| void | scrollChanged () |
| void | speedMultiplierChanged () |
| void | statusChanged () |
Public Member Functions | |
| Player (BmsNotes *notes, BmsLiveScore *score, GameplayState *state, resource_managers::Profile *profile, QFuture< BmsGameReferee > referee, std::chrono::nanoseconds chartLength, double initialBpm, QObject *parent=nullptr) | |
| virtual void | update (std::chrono::nanoseconds offsetFromStart, bool lastUpdate) |
| virtual void | passKey (input::BmsKey key, ChartRunner::EventType eventType, std::chrono::nanoseconds offset) |
| void | setup () |
| auto | getNotes () const -> BmsNotes * |
| auto | getScore () const -> BmsLiveScore * |
| auto | getState () const -> GameplayState * |
| auto | getColumns () const -> QList< int > |
| Q_INVOKABLE bool | isScratchColumn (int column) const |
| auto | getProfile () const -> resource_managers::Profile * |
| auto | getPosition () const -> double |
| auto | getBeatPosition () const -> double |
| auto | positionAt (std::chrono::nanoseconds offsetFromStart) const -> double |
| auto | speedMultiplierAt (std::chrono::nanoseconds offsetFromStart) const -> double |
| auto | hasSpeedChanges () const -> bool |
| auto | getSpeedMultiplier () const -> double |
| auto | beatPositionAt (std::chrono::nanoseconds offsetFromStart) const -> double |
| auto | getElapsed () const -> int64_t |
| auto | getStatus () const -> ChartRunner::Status |
| void | setStatus (ChartRunner::Status status) |
| auto | getChartLength () const -> int64_t |
| auto | getBpm () const -> double |
| auto | getScroll () const -> double |
| auto | finish (const ChartData &chartData) -> BmsScore * |
Protected Attributes | |
| std::optional< BmsGameReferee > | referee |
Properties | |
| BmsNotes * | notes |
| The notes of the chart being played. | |
| BmsLiveScore * | score |
| The live score of the player, which gets updated during gameplay. | |
| GameplayState * | state |
| The gameplay state of the player, containing column states and barlines. | |
| QList< int > | columns |
| Playable column indices in the default visual order. | |
| resource_managers::Profile * | profile |
| The profile of the player. | |
| double | position |
| The positition in the chart, expressed in beats*scroll. | |
| double | beatPosition |
| The position in the chart, expressed in beats. | |
| double | bpm |
| The current BPM of the chart. | |
| double | scroll = 1.0 |
The current #SCROLL of the chart. | |
| double | speedMultiplier = 1.0 |
Current #SPEED multiplier at the visual chart time, or 1. | |
| int64_t | elapsed {} |
| The elapsed time since the start of the chart, in nanoseconds. | |
| ChartRunner::Status | status { ChartRunner::Status::Loading } |
| The current status of the player. | |
| int64_t | chartLength |
| The length of the chart in nanoseconds. | |
A player of a chart.
The Player class represents a player of a chart. It plays sounds, gets its score updated, etc.
|
explicit |
| auto gameplay_logic::Player::beatPositionAt | ( | std::chrono::nanoseconds | offsetFromStart | ) | const -> double |
|
signal |
|
signal |
|
signal |
| auto gameplay_logic::Player::getBeatPosition | ( | ) | const -> double |
| double gameplay_logic::Player::getBpm | ( | ) | const -> double |
| auto gameplay_logic::Player::getChartLength | ( | ) | const -> int64_t |
| auto gameplay_logic::Player::getColumns | ( | ) | const -> QList<int> |
| auto gameplay_logic::Player::getElapsed | ( | ) | const -> int64_t |
| auto gameplay_logic::Player::getNotes | ( | ) | const -> BmsNotes* |
| auto gameplay_logic::Player::getPosition | ( | ) | const -> double |
| auto gameplay_logic::Player::getProfile | ( | ) | const -> resource_managers::Profile* |
| auto gameplay_logic::Player::getScore | ( | ) | const -> BmsLiveScore* |
| double gameplay_logic::Player::getScroll | ( | ) | const -> double |
|
inline |
| auto gameplay_logic::Player::getState | ( | ) | const -> GameplayState* |
| auto gameplay_logic::Player::getStatus | ( | ) | const -> ChartRunner::Status |
| auto gameplay_logic::Player::hasSpeedChanges | ( | ) | const -> bool |
| bool gameplay_logic::Player::isScratchColumn | ( | int | column | ) | const |
Whether a column index identifies a scratch lane.
|
virtual |
Reimplemented in gameplay_logic::RePlayer, and gameplay_logic::AutoPlayer.
| auto gameplay_logic::Player::positionAt | ( | std::chrono::nanoseconds | offsetFromStart | ) | const -> double |
|
signal |
|
signal |
| void gameplay_logic::Player::setStatus | ( | ChartRunner::Status | status | ) |
| void gameplay_logic::Player::setup | ( | ) |
| auto gameplay_logic::Player::speedMultiplierAt | ( | std::chrono::nanoseconds | offsetFromStart | ) | const -> double |
|
signal |
|
signal |
|
virtual |
Reimplemented in gameplay_logic::RePlayer, and gameplay_logic::AutoPlayer.
|
protected |
|
read |
The position in the chart, expressed in beats.
|
read |
The current BPM of the chart.
|
read |
The length of the chart in nanoseconds.
|
read |
Playable column indices in the default visual order.
Uses the player's effective keymode, with the left scratch first and the right scratch last. Five-key modes omit unused columns. Themes can reorder these indices without changing the underlying column states.
|
read |
The elapsed time since the start of the chart, in nanoseconds.
|
read |
The notes of the chart being played.
|
read |
The positition in the chart, expressed in beats*scroll.
|
read |
The profile of the player.
|
read |
The live score of the player, which gets updated during gameplay.
|
read |
The current #SCROLL of the chart.
|
read |
Current #SPEED multiplier at the visual chart time, or 1.
Multiply drawing distances from the judgement line by this value. Note positions, BPM, #SCROLL and hit timestamps are unchanged.
|
read |
The gameplay state of the player, containing column states and barlines.
|
read |
The current status of the player.