Docs: Playground - lemoncove/osu-playground GitHub Wiki
Playground is the class which allows access to osu!Playground's core functionality.
Properties
PLAYFIELD_WIDTH
The width of the osu! playfield in osu!pixels (512).
PLAYFIELD_HEIGHT
The height of the osu! playfield in osu!pixels (384).
Methods
AddFloat(name, input)
Creates a bindable floating point value with the name
nameand default valueinput.
AddInt(name, input)
Creates a bindable integer value with the name
nameand default valueinput.
AddBool(name, input)
Creates a bindable boolean value with the name
nameand default valueinput.
AddVector2(name, input)
Creates a bindable
Vector2value with the namenameand default valueinput.
AddChoice(name, input)
Creates a bindable string value with the name
nameand default valueinput.
| Note |
|---|
The min and max values in these functions can be either numbers or other bindable values. |
AddOptionFloat(variable, name, precision, min, max)
Binds a bindable floating point value to an option in the options panel with the label
nameand minimum and maximum values ofminandmax. The value is stored toprecisiondecimal places.
AddOptionInt(variable, name, min, max)
Binds a bindable integer value to an option in the options panel with the label
nameand minimum and maximum values ofminandmax.
AddOptionBool(variable, name)
Binds a bindable boolean value to an option in the options panel with the label
name.
AddOptionVector2(variable, name)
Binds a bindable
Vector2value to an option in the options panel with the labelnameas well as a handle to manipulate the value.
AddOptionChoice(variable, name, values)
Binds a bindable string value to an dropdown in the options panel with the label
namewith the options in the arrayvalues.
GetValueFloat(name)
Gets the value of a bindable floating point variable by its name.
GetValueInt(name)
Gets the value of a bindable integer variable by its name.
GetValueBool(name)
Gets the value of a bindable boolean variable by its name.
GetValueVector2(name)
Gets the value of a bindable
Vector2variable by its name.
GetValueChoice(name)
Gets the value of a bindable string variable by its name.
| Note |
|---|
The draw parameters in hit object functions are optional and default to true. |
AddHitCircle(position, draw)
Creates a hit circle at the
Vector2positionposition. Ifdrawis true, the hit circle is drawn.
AddSlider(curveType, list, draw)
Creates a slider of the type
curveTypewith the anchor points inlist. Ifdrawis true, the slider is drawn.