Class Player

Player control class

This controls the user interaction with the current chart being played in gameplay.

One way to retrieve the Player in gameplay is SCREENMAN:GetTopScreen():GetChild("PlayerP1"). The Player owns the NoteField, Combo, Tap Judgments, and Hold Judgments, among other things. Most of these children can be found via GetChild by name, such as "Combo", "Judgment", "NoteField".

This class inherits all methods from these classes: ActorFrame Actor

Methods

player:SetLife (value) Set the Lifebar to a new given value.
player:ChangeLife (amount) Set the Lifebar to a new value by changing it by a given amount.
player:GetPlayerTimingData () Retrieve the TimingData that the Player is relying on.


Methods

player:SetLife (value)
Set the Lifebar to a new given value. Ordinarily, this value must be between 0 and 1, but the max is actually determined by metric LifeMultiplier.

Parameters:

  • value number The new value to set the Lifebar to.

Returns:

    self
player:ChangeLife (amount)
Set the Lifebar to a new value by changing it by a given amount. The value given to this function is scaled by Preference LifeDifficultyScale, which is the Life Difficulty setting.

Parameters:

  • amount number The amount to change the Player life.

Returns:

    self
player:GetPlayerTimingData ()
Retrieve the TimingData that the Player is relying on. Normally, this is just the TimingData of the current Steps. This is like an alias of GAMESTATE:GetCurrentSteps():GetTimingData().

Returns:

    TimingData The TimingData of the currently playing Steps.
generated by LDoc 1.5.0 Last updated 2024-10-02 05:06:53