Fix note positioning

This commit is contained in:
CuckyDev 2021-07-11 18:04:30 -04:00
parent 910105b852
commit ad89799f58
2 changed files with 34 additions and 16 deletions

View File

@ -67,7 +67,12 @@ class Note extends FlxSprite
this.prevNote = prevNote;
isSustainNote = sustainNote;
x += 50;
this.noteData = noteData;
if (!inCharter)
x = PlayState.strumLineNotes.members[Math.floor(Math.abs(noteData))].x;
else
x += 50;
// MAKE SURE ITS DEFINITELY OFF SCREEN?
y -= 2000;
@ -86,8 +91,6 @@ class Note extends FlxSprite
if (this.strumTime < 0 )
this.strumTime = 0;
this.noteData = noteData;
var daStage:String = PlayState.curStage;
//defaults if no noteStyle was found in chart
@ -177,20 +180,20 @@ class Note extends FlxSprite
noteScore * 0.2;
alpha = 0.6;
x += width / 2;
x += width / 2 + 17;
if (noteTypeCheck == 'pixel')
x -= 8;
//x += width / 2;
originColor = prevNote.originColor;
animation.play(dataColor[originColor] + 'holdend'); // This works both for normal colors and quantization colors
updateHitbox();
x -= width / 2;
//x -= width / 2;
if (noteTypeCheck == 'pixel')
x += 30;
if (inCharter)
x += 30;
//if (PlayState.curStage.startsWith('school'))
// x += 30;
if (prevNote.isSustainNote)
{

View File

@ -997,6 +997,9 @@ class PlayState extends MusicBeatState
playerStrums = new FlxTypedGroup<FlxSprite>();
cpuStrums = new FlxTypedGroup<FlxSprite>();
generateStaticArrows(0);
generateStaticArrows(1);
// startCountdown();
if (SONG.song == null)
@ -1308,8 +1311,9 @@ class PlayState extends MusicBeatState
{
inCutscene = false;
generateStaticArrows(0);
generateStaticArrows(1);
appearStaticArrows();
//generateStaticArrows(0);
//generateStaticArrows(1);
#if windows
// pre lowercasing the song name (startCountdown)
@ -1796,9 +1800,6 @@ class PlayState extends MusicBeatState
{
swagNote.x += FlxG.width / 2; // general offset
}
else
{
}
}
daBeats += 1;
}
@ -1901,10 +1902,11 @@ class PlayState extends MusicBeatState
babyArrow.updateHitbox();
babyArrow.scrollFactor.set();
babyArrow.alpha = 0;
if (!isStoryMode)
{
babyArrow.y -= 10;
babyArrow.alpha = 0;
//babyArrow.alpha = 0;
FlxTween.tween(babyArrow, {y: babyArrow.y + 10, alpha: 1}, 1, {ease: FlxEase.circOut, startDelay: 0.5 + (0.2 * i)});
}
@ -1934,6 +1936,15 @@ class PlayState extends MusicBeatState
}
}
private function appearStaticArrows():Void
{
strumLineNotes.forEach(function(babyArrow:FlxSprite)
{
if (isStoryMode)
babyArrow.alpha = 1;
});
}
function tweenCamIn():Void
{
FlxTween.tween(FlxG.camera, {zoom: 1.3}, (Conductor.stepCrochet * 4 / 1000), {ease: FlxEase.elasticInOut});
@ -2796,7 +2807,11 @@ class PlayState extends MusicBeatState
}
if (daNote.isSustainNote)
{
daNote.x += daNote.width / 2 + 17;
if (PlayState.curStage.startsWith('school'))
daNote.x -= 8;
}
// trace(daNote.y);
// WIP interpolation shit? Need to fix the pause issue