Etterna 0.74.4
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
PlayerState Class Reference

The player's indivdual state. More...

#include <PlayerState.h>

Collaboration diagram for PlayerState:
Collaboration graph
[legend]

Public Member Functions

 PlayerState ()
 Set up the PlayerState with initial values.
 
void Reset ()
 Reset the PlayerState with the initial values.
 
void Update (float fDelta)
 Update the PlayerState based on the present time.
 
void SetPlayerNumber (PlayerNumber pn)
 
void ResetCacheInfo ()
 
auto GetDisplayedTiming () const -> const TimingData &
 
void ResetToDefaultPlayerOptions (ModsLevel l)
 Change the PlayerOptions to their default.
 
void SetNumCols (int ncol)
 
auto GetNumCols () -> int
 
void PushSelf (lua_State *L)
 

Public Attributes

PlayerNumber m_PlayerNumber
 The PlayerNumber assigned to this Player: usually 1 or 2.
 
MultiPlayer m_mp
 The MultiPlayer number assigned to this Player, typically 1-32.
 
float m_NotefieldZoom
 
std::vector< CacheDisplayedBeatm_CacheDisplayedBeat
 Holds a vector sorted by real beat, the beat that would be displayed in the NoteField (because they are affected by scroll segments), and also the velocity. This vector will be populated on Player::Load() be used a lot in ArrowEffects to determine the target beat in O(log N).
 
std::vector< CacheNoteStatm_CacheNoteStat
 Holds a vector sorted by beat, the cumulative number of notes from the start of the song. This will be used by [insert more description here].
 
ModsGroup< PlayerOptionsm_PlayerOptions {}
 The PlayerOptions presently in use by the Player.
 
float m_fLastDrawnBeat
 Used to push note-changing modifiers back so that notes don't pop.
 
HealthState m_HealthState
 The Player's HealthState in general terms.
 
PlayerController m_PlayerController
 The type of person/machine controlling the Player.
 
SampleHistory m_EffectHistory
 
int m_iCpuSkill
 
float m_fReadBPM
 
bool m_bGoalTrackerUsesReplay = false
 
int m_NumCols
 
float playertargetgoal = 0.93F
 

Detailed Description

The player's indivdual state.

Member Function Documentation

◆ ResetToDefaultPlayerOptions()

void PlayerState::ResetToDefaultPlayerOptions ( ModsLevel  l)

Change the PlayerOptions to their default.

Parameters
lthe level of mods to reset.

◆ Update()

void PlayerState::Update ( float  fDelta)

Update the PlayerState based on the present time.

Parameters
fDeltathe current time.

Member Data Documentation

◆ m_fLastDrawnBeat

float PlayerState::m_fLastDrawnBeat
mutable

Used to push note-changing modifiers back so that notes don't pop.

This is used during gameplay and set by NoteField.

◆ m_PlayerNumber

PlayerNumber PlayerState::m_PlayerNumber

The PlayerNumber assigned to this Player: usually 1 or 2.

TODO: Remove use of PlayerNumber. All data about the player should live in PlayerState and callers should not use PlayerNumber to index into GameState.


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