mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-04-21 19:31:52 -04:00
Fix bug where getDirection didn't work in scripts.
This commit is contained in:
parent
618231954b
commit
3e1146aadf
2 changed files with 17 additions and 17 deletions
2
assets
2
assets
|
@ -1 +1 @@
|
|||
Subproject commit e634c8f50c34845097283e0f411e1f89409e1498
|
||||
Subproject commit 5d5a860af517ef0cf2aa39c537eb228c7ae803d0
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue