|
RhythmGame 1.4.3
|
The update manager of notes and sounds during gameplay. More...
#include <BmsGameReferee.h>
Classes | |
| struct | PositionInfo |
| The position at which we are in the chart. More... | |
Public Types | |
| using | Position = double |
Public Member Functions | |
| BmsGameReferee (const BmsGameReferee &)=delete | |
| BmsGameReferee & | operator= (const BmsGameReferee &)=delete |
| BmsGameReferee (BmsGameReferee &&)=default | |
| BmsGameReferee & | operator= (BmsGameReferee &&)=default |
| BmsGameReferee (std::array< std::vector< charts::BmsNotesData::Note >, charts::BmsNotesData::columnNumber > notes, const std::vector< std::pair< charts::BmsNotesData::Time, uint64_t > > &bgmNotes, std::vector< charts::BmsNotesData::BpmChangeValues > bpmChanges, std::vector< charts::BmsNotesData::SpeedChange > speedChanges, std::shared_ptr< sounds::Sound > mineHitSound, BmsLiveScore *score, std::unordered_map< uint64_t, std::shared_ptr< sounds::Sound > > sounds, rules::HitRules hitRules) | |
| void | update (std::chrono::nanoseconds offsetFromStart, bool lastUpdate=false) |
| Update the internal state of the referee. | |
| auto | getBpm (std::chrono::nanoseconds offsetFromStart) const -> charts::BmsNotesData::BpmChangeValues |
| auto | getSpeedMultiplier (std::chrono::nanoseconds offsetFromStart) const -> double |
| auto | hasSpeedChanges () const -> bool |
| auto | passPressed (std::chrono::nanoseconds offsetFromStart, input::BmsKey key) -> void |
| Handle a key press event. | |
| auto | passReleased (std::chrono::nanoseconds offsetFromStart, input::BmsKey key) -> void |
| Handle a key press event. | |
Static Public Member Functions | |
| static auto | getPosition (charts::BmsNotesData::BpmChangeValues bpm, std::chrono::nanoseconds offsetFromStart) -> PositionInfo |
| Get the position in the chart, expressed in beats. | |
The update manager of notes and sounds during gameplay.
The BmsGameReferee class is responsible for getting hits and misses of notes, playing note and BGM sounds, and providing the current position of notes.
| using gameplay_logic::BmsGameReferee::Position = double |
|
delete |
|
default |
|
explicit |
| auto gameplay_logic::BmsGameReferee::getBpm | ( | std::chrono::nanoseconds | offsetFromStart | ) | const -> charts::BmsNotesData::BpmChangeValues |
|
static |
Get the position in the chart, expressed in beats.
| bpm | The current BPM change (as returned by getBpm()) |
| offsetFromStart | The time offset from the start of the chart |
| auto gameplay_logic::BmsGameReferee::getSpeedMultiplier | ( | std::chrono::nanoseconds | offsetFromStart | ) | const -> double |
|
inline |
|
default |
|
delete |
| auto gameplay_logic::BmsGameReferee::passPressed | ( | std::chrono::nanoseconds | offsetFromStart, |
| input::BmsKey | key | ||
| ) | -> void |
Handle a key press event.
| offsetFromStart | The time offset from the start of the chart when the press happened |
| key | The key that was pressed |
| auto gameplay_logic::BmsGameReferee::passReleased | ( | std::chrono::nanoseconds | offsetFromStart, |
| input::BmsKey | key | ||
| ) | -> void |
Handle a key press event.
| offsetFromStart | The time offset from the start of the chart when the release happened |
| key | The key that was released |
| void gameplay_logic::BmsGameReferee::update | ( | std::chrono::nanoseconds | offsetFromStart, |
| bool | lastUpdate = false |
||
| ) |
Update the internal state of the referee.
| offsetFromStart | The current time offset from the start of the chart |
| lastUpdate | If true, don't play any sounds in this and future updates |