Update Note.hx

This commit is contained in:
Detoria 2021-03-25 15:59:39 -03:00 committed by GitHub
parent c239d05aa8
commit 463269dbe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,9 +40,8 @@ class Note extends FlxSprite
if (prevNote == null)
prevNote = this;
// And have up and down arrows flipped too? Nop
/* if (FlxG.save.data.downscroll)
flipY = true; */
if (FlxG.save.data.downscroll)
flipY = true;
this.prevNote = prevNote;
isSustainNote = sustainNote;
@ -50,7 +49,6 @@ class Note extends FlxSprite
x += 50;
// MAKE SURE ITS DEFINITELY OFF SCREEN?
y -= 2000;
this.strumTime = strumTime + FlxG.save.data.offset;
this.noteData = noteData;
@ -67,29 +65,19 @@ class Note extends FlxSprite
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);
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);
}
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]);
}
setGraphicSize(Std.int(width * PlayState.daPixelZoom));
@ -103,24 +91,16 @@ class Note extends FlxSprite
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();
antialiasing = true;
@ -184,7 +164,7 @@ class Note extends FlxSprite
prevNote.animation.play('redhold');
}
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * FlxG.save.data.noteSpeed;
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * PlayState.SONG.speed;
prevNote.updateHitbox();
// prevNote.setGraphicSize();
}