1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-08-19 23:15:15 +00:00

Fix bug where getDirection didn't work in scripts.

This commit is contained in:
EliteMasterEric 2023-11-07 18:32:00 -05:00
parent 618231954b
commit 3e1146aadf
2 changed files with 17 additions and 17 deletions

2
assets

@ -1 +1 @@
Subproject commit e634c8f50c34845097283e0f411e1f89409e1498
Subproject commit 5d5a860af517ef0cf2aa39c537eb228c7ae803d0

View file

@ -658,6 +658,22 @@ class SongNoteDataRaw
this.kind = kind;
}
/**
* The direction of the note, if applicable.
* Strips the strumline index from the data.
*
* 0 = left, 1 = down, 2 = up, 3 = right
*/
public inline function getDirection(strumlineSize:Int = 4):Int
{
return this.data % strumlineSize;
}
public function getDirectionName(strumlineSize:Int = 4):String
{
return SongNoteData.buildDirectionName(this.data, strumlineSize);
}
@:jignored
var _stepTime:Null<Float> = null;
@ -714,22 +730,6 @@ abstract SongNoteData(SongNoteDataRaw) from SongNoteDataRaw to SongNoteDataRaw
this = new SongNoteDataRaw(time, data, length, kind);
}
/**
* The direction of the note, if applicable.
* Strips the strumline index from the data.
*
* 0 = left, 1 = down, 2 = up, 3 = right
*/
public inline function getDirection(strumlineSize:Int = 4):Int
{
return this.data % strumlineSize;
}
public function getDirectionName(strumlineSize:Int = 4):String
{
return SongNoteData.buildDirectionName(this.data, strumlineSize);
}
public static function buildDirectionName(data:Int, strumlineSize:Int = 4):String
{
switch (data % strumlineSize)