RhythmGame 1.4.3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
gameplay_logic::AutoPlayer Class Referencefinal

A player that plays automatically, hitting all notes perfectly. More...

#include <ChartRunner.h>

Inheritance diagram for gameplay_logic::AutoPlayer:
Inheritance graph
[legend]
Collaboration diagram for gameplay_logic::AutoPlayer:
Collaboration graph
[legend]

Public Member Functions

 AutoPlayer (BmsNotes *notes, BmsLiveScore *score, GameplayState *state, resource_managers::Profile *profile, QFuture< BmsGameReferee > referee, std::chrono::nanoseconds chartLength, double initialBpm, std::vector< HitEvent > events, QObject *parent=nullptr)
 
void passKey (input::BmsKey key, ChartRunner::EventType eventType, std::chrono::nanoseconds offset) override
 
void update (std::chrono::nanoseconds offsetFromStart, bool lastUpdate) override
 
- Public Member Functions inherited from gameplay_logic::Player
 Player (BmsNotes *notes, BmsLiveScore *score, GameplayState *state, resource_managers::Profile *profile, QFuture< BmsGameReferee > referee, std::chrono::nanoseconds chartLength, double initialBpm, QObject *parent=nullptr)
 
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 *
 

Additional Inherited Members

- Signals inherited from gameplay_logic::Player
void positionChanged (double delta)
 
void beatPositionChanged (double delta)
 
void elapsedChanged (int64_t delta)
 
void bpmChanged ()
 
void scrollChanged ()
 
void speedMultiplierChanged ()
 
void statusChanged ()
 
- Protected Attributes inherited from gameplay_logic::Player
std::optional< BmsGameReferee > referee
 
- Properties inherited from gameplay_logic::Player
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.
 

Detailed Description

A player that plays automatically, hitting all notes perfectly.

The AutoPlayer class plays automatically, hitting all notes perfectly. Its score is not saved.

Constructor & Destructor Documentation

◆ AutoPlayer()

gameplay_logic::AutoPlayer::AutoPlayer ( BmsNotes *  notes,
BmsLiveScore *  score,
GameplayState *  state,
resource_managers::Profile *  profile,
QFuture< BmsGameReferee >  referee,
std::chrono::nanoseconds  chartLength,
double  initialBpm,
std::vector< HitEvent >  events,
QObject *  parent = nullptr 
)
explicit

Member Function Documentation

◆ passKey()

void gameplay_logic::AutoPlayer::passKey ( input::BmsKey  key,
ChartRunner::EventType  eventType,
std::chrono::nanoseconds  offset 
)
overridevirtual

Reimplemented from gameplay_logic::Player.

◆ update()

void gameplay_logic::AutoPlayer::update ( std::chrono::nanoseconds  offsetFromStart,
bool  lastUpdate 
)
overridevirtual

Reimplemented from gameplay_logic::Player.


The documentation for this class was generated from the following files: