Fixed Note Speed

This commit is contained in:
Detoria
2021-03-24 04:48:14 -03:00
parent fc36958af9
commit 0cb23f7972
3 changed files with 121 additions and 28 deletions

View File

@ -40,8 +40,9 @@ class Note extends FlxSprite
if (prevNote == null)
prevNote = this;
if (FlxG.save.data.downscroll)
flipY = true;
// And have up and down arrows flipped too? Nop
/* if (FlxG.save.data.downscroll)
flipY = true; */
this.prevNote = prevNote;
isSustainNote = sustainNote;
@ -49,6 +50,7 @@ class Note extends FlxSprite
x += 50;
// MAKE SURE ITS DEFINITELY OFF SCREEN?
y -= 2000;
this.strumTime = strumTime + FlxG.save.data.offset;
this.noteData = noteData;
@ -64,20 +66,30 @@ class Note extends FlxSprite
animation.add('redScroll', [7]);
animation.add('blueScroll', [5]);
animation.add('purpleScroll', [4]);
// Hold piece
animation.add('purplehold', [0]);
animation.add('greenhold', [2]);
animation.add('redhold', [3]);
animation.add('bluehold', [1]);
if (isSustainNote)
{
loadGraphic(Paths.image('weeb/pixelUI/arrowEnds'), true, 7, 6);
animation.add('purpleholdend', [4]);
animation.add('greenholdend', [6]);
animation.add('redholdend', [7]);
animation.add('blueholdend', [5]);
animation.add('purplehold', [0]);
animation.add('greenhold', [2]);
animation.add('redhold', [3]);
animation.add('bluehold', [1]);
if(!FlxG.save.data.downscroll)
{
// Trail end
animation.add('purpleholdend', [4]);
animation.add('greenholdend', [6]);
animation.add('redholdend', [7]);
animation.add('blueholdend', [5]);
}else {
animation.add('purpleholdend', [4], 0, false, false, true);
animation.add('greenholdend', [6], 0, false, false, true);
animation.add('redholdend', [7], 0, false, false, true);
animation.add('blueholdend', [5], 0, false, false, true);
}
}
setGraphicSize(Std.int(width * PlayState.daPixelZoom));
@ -90,16 +102,24 @@ class Note extends FlxSprite
animation.addByPrefix('redScroll', 'red0');
animation.addByPrefix('blueScroll', 'blue0');
animation.addByPrefix('purpleScroll', 'purple0');
animation.addByPrefix('purpleholdend', 'pruple end hold');
animation.addByPrefix('greenholdend', 'green hold end');
animation.addByPrefix('redholdend', 'red hold end');
animation.addByPrefix('blueholdend', 'blue hold end');
animation.addByPrefix('purplehold', 'purple hold piece');
animation.addByPrefix('greenhold', 'green hold piece');
animation.addByPrefix('redhold', 'red hold piece');
animation.addByPrefix('bluehold', 'blue hold piece');
if(!FlxG.save.data.downscroll)
{
animation.addByPrefix('purpleholdend', 'pruple end hold');
animation.addByPrefix('greenholdend', 'green hold end');
animation.addByPrefix('redholdend', 'red hold end');
animation.addByPrefix('blueholdend', 'blue hold end');
}else {
animation.addByPrefix('purpleholdend', 'pruple end hold', 0, false, false, true);
animation.addByPrefix('greenholdend', 'green hold end', 0, false, false, true);
animation.addByPrefix('redholdend', 'red hold end', 0, false, false, true);
animation.addByPrefix('blueholdend', 'blue hold end', 0, false, false, true);
}
setGraphicSize(Std.int(width * 0.7));
updateHitbox();
@ -164,7 +184,7 @@ class Note extends FlxSprite
prevNote.animation.play('redhold');
}
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * PlayState.SONG.speed;
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * FlxG.save.data.noteSpeed;
prevNote.updateHitbox();
// prevNote.setGraphicSize();
}