Skip to main content

Note

Kindclass
Packageobjects
Full nameobjects.Note
Sourcesource/objects/Note.hx
ExtendsFlxSprite

The note object used as a data structure to spawn and manage notes during gameplay.

If you want to make a custom note type, you should search for: "function set_noteType"

Public fields​

NameTypeStaticDefaultNotes
extraDataMap<String, Dynamic>nonew Map<String, Dynamic>()—
parentSTFloatno0—
parentSLFloatno0—
strumTimeFloatno0—
mustPressBoolnofalse—
doOppStuffBoolnofalse—
noteDataIntno0—
canBeHitBoolnofalse—
tooLateBoolnofalse—
wasGoodHitBoolnofalse—
ignoreNoteBoolnofalse—
hitByOpponentBoolnofalse—
pendingKillBoolnofalseWhether this note is already queued in PlayState.killNotes, waiting for the end-of-frame kill(). Replaces an Array.contains() scan per note per frame, and is reset by setupNoteData() so a recycled note never starts queued. (#88)
blockHitBoolnofalse—
noteDensityFloatno1—
sustainLengthFloatno0—
isSustainNoteBoolnofalse—
isSustainEndBoolnofalse—
noteTypeStringnonullproperty (default, set)
eventNameStringno''—
eventLengthIntno0—
eventVal1Stringno''—
eventVal2Stringno''—
rgbShaderRGBShaderReferenceno——
globalRgbShadersArray<RGBPalette>yes[]—
inEditorBoolnoType.getClassName(Type.getClass(FlxG.state)) == 'editors.ChartingState'—
animSuffixStringno''—
gfNoteBoolnofalse—
earlyHitMultFloatno0.5—
lateHitMultFloatno1—
lowPriorityBoolnofalse—
SUSTAIN_SIZEIntyes44final
swagWidthFloatyes160 * 0.7final
colArrayArray<String>yes['purple', 'blue', 'green', 'red']final
defaultNoteSkinStringyes'noteskins/NOTE_assets'property (default, never)
noteSplashDataNoteSplashDatano{—
noteHoldSplashSustainSplashno——
noteSplashDisabledBoolnofalseLua shit
offsetXFloatno0—
offsetYFloatno0—
offsetAngleFloatno0—
multAlphaFloatno1—
multSpeedFloatno1—
copyXBoolnotrue—
copyYBoolnotrue—
copyAngleBoolnotrue—
copyAlphaBoolnotrue—
copyScaleXBoolnotrue—
copyScaleYBoolnotrue—
hitHealthFloatno0.023—
missHealthFloatno0.0475—
ratingStringno'unknown'—
ratingModFloatno0—
ratingDisabledBoolnofalse—
textureStringnonullproperty (default, set)
sustainScaleFloatno1.0—
noAnimationBoolnofalse—
noMissAnimationBoolnofalse—
hitCausesMissBoolnofalse—
distanceFloatno2000—
hitsoundDisabledBoolnofalse—
pixelNoteBoolnofalse—
useRGBShaderBoolnotrueproperty (default, set)
originalHeightFloatno6—

Public methods​

defaultRGB​

function defaultRGB()

View source

toJson​

function toJson()

View source

toString​

override function toString()

View source

new (constructor)​

function new(?newStrumTime:Float, ?newNoteData:Int)
ParameterTypeDefault
newStrumTime (optional)Float—
newNoteData (optional)Int—

View source

followStrum​

inline function followStrum(strum:StrumNote, songSpeed:Float = 1):Void
ParameterTypeDefault
strumStrumNote—
songSpeed (optional)Float1

View source

clipToStrumNote​

function clipToStrumNote(myStrum:StrumNote)
ParameterTypeDefault
myStrumStrumNote—

View source

destroy​

override function destroy()

View source

updateRGBColors​

function updateRGBColors()

View source

setupNoteData​

function setupNoteData(chartNoteData:PreloadedChartNote):Void
ParameterTypeDefault
chartNoteDataPreloadedChartNote—

View source

Internals​

Private / internal members
FieldTypeStatic
changeSizeBoolno
noteColorArray<FlxColor>no
_lastNoteOffXFloatno
_lastValidCheckedStringyes
superCoolColor—no
arrArray<Int>no
rainbowTime—no
firstOffX—no
shouldCenterOffsetsBoolno
Method
function set_useRGBShader(value:Bool):Bool
function set_texture(value:String):String
function set_noteType(value:String):String
function reloadNote(texture:String = '', postfix:String = '')
override function update(elapsed:Float)
override function set_clipRect(rect:FlxRect):FlxRect