mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-08-19 15:05:06 +00:00
fixed certain notes not appearing
This commit is contained in:
parent
9c25489733
commit
c106057ec4
|
@ -73,7 +73,7 @@ class ChartingState extends MusicBeatState
|
|||
FlxG.sound.music.pause();
|
||||
FlxG.sound.music.time = 0;
|
||||
};
|
||||
Conductor.changeBPM(120);
|
||||
Conductor.changeBPM(100);
|
||||
|
||||
var saveButton:FlxButton = new FlxButton(0, 0, "Save", function()
|
||||
{
|
||||
|
@ -239,23 +239,11 @@ class ChartingState extends MusicBeatState
|
|||
{
|
||||
var daNoteInfo = i[1];
|
||||
|
||||
switch (daNoteInfo)
|
||||
{
|
||||
case 0:
|
||||
daNoteInfo = 4;
|
||||
case 1:
|
||||
daNoteInfo = 3;
|
||||
case 2:
|
||||
daNoteInfo = 1;
|
||||
case 3:
|
||||
daNoteInfo = 2;
|
||||
}
|
||||
|
||||
var note:Note = new Note(i[0], daNoteInfo);
|
||||
note.setGraphicSize(GRID_SIZE, GRID_SIZE);
|
||||
note.updateHitbox();
|
||||
note.x = Math.floor(i[1] * GRID_SIZE);
|
||||
note.y = getYfromStrum(note.strumTime);
|
||||
note.y = getYfromStrum(note.strumTime) % (Conductor.stepCrochet * sections[curSection].lengthInSteps);
|
||||
|
||||
curRenderedNotes.add(note);
|
||||
}
|
||||
|
@ -268,13 +256,16 @@ class ChartingState extends MusicBeatState
|
|||
|
||||
private function addNote():Void
|
||||
{
|
||||
sections[curSection].notes.push([getStrumTime(dummyArrow.y), Math.floor(FlxG.mouse.x / GRID_SIZE)]);
|
||||
sections[curSection].notes.push([
|
||||
getStrumTime(dummyArrow.y) * FlxMath.maxInt(curSection, 1),
|
||||
Math.floor(FlxG.mouse.x / GRID_SIZE)
|
||||
]);
|
||||
updateGrid();
|
||||
}
|
||||
|
||||
function getStrumTime(yPos:Float):Float
|
||||
{
|
||||
return FlxMath.remapToRange(yPos, gridBG.y, gridBG.y + gridBG.height, 0, (16 * Conductor.stepCrochet) * FlxMath.maxInt(curSection, 1));
|
||||
return FlxMath.remapToRange(yPos, gridBG.y, gridBG.y + gridBG.height, 0, 16 * Conductor.stepCrochet);
|
||||
}
|
||||
|
||||
function getYfromStrum(strumTime:Float, ?isNote:Bool = true):Float
|
||||
|
|
|
@ -54,20 +54,20 @@ class Note extends FlxSprite
|
|||
updateHitbox();
|
||||
antialiasing = true;
|
||||
|
||||
switch (Math.abs(noteData))
|
||||
switch (noteData)
|
||||
{
|
||||
case 1:
|
||||
x += swagWidth * 2;
|
||||
animation.play('greenScroll');
|
||||
case 2:
|
||||
x += swagWidth * 3;
|
||||
animation.play('redScroll');
|
||||
case 3:
|
||||
x += swagWidth * 1;
|
||||
animation.play('blueScroll');
|
||||
case 4:
|
||||
case 0:
|
||||
x += swagWidth * 0;
|
||||
animation.play('purpleScroll');
|
||||
case 1:
|
||||
x += swagWidth * 1;
|
||||
animation.play('blueScroll');
|
||||
case 2:
|
||||
x += swagWidth * 2;
|
||||
animation.play('greenScroll');
|
||||
case 3:
|
||||
x += swagWidth * 3;
|
||||
animation.play('redScroll');
|
||||
}
|
||||
|
||||
trace(prevNote);
|
||||
|
|
|
@ -274,11 +274,10 @@ class PlayState extends MusicBeatState
|
|||
sectionScores[0].push(0);
|
||||
sectionScores[1].push(0);
|
||||
|
||||
var daStrumTime:Float = songNotes[0];
|
||||
var daStrumTime:Float = songNotes[0] + ((Conductor.stepCrochet * 16) * playerCounter);
|
||||
trace(daStrumTime);
|
||||
var daNoteData:Int = songNotes[1];
|
||||
|
||||
if (daNoteData != 0)
|
||||
{
|
||||
var daStrumTime:Float = daStrumTime;
|
||||
|
||||
var oldNote:Note;
|
||||
|
@ -303,7 +302,6 @@ class PlayState extends MusicBeatState
|
|||
sectionScores[0][daBeats] += swagNote.noteScore;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// only need to do it once
|
||||
if (playerCounter == 0)
|
||||
|
|
Loading…
Reference in a new issue