CHARTING SYSTEM IN PROGRESS

This commit is contained in:
Cameron Taylor 2020-10-17 14:33:35 -07:00
parent 33385ddd15
commit 188674b64c
2 changed files with 23 additions and 8 deletions

View File

@ -172,6 +172,11 @@ class ChartingState extends MusicBeatState
stepperLength.value = _song.notes[curSection].lengthInSteps;
stepperLength.name = "section_length";
var copyButton:FlxButton = new FlxButton(110, 8, "Copy last section", function()
{
copySection();
});
check_mustHitSection = new FlxUICheckBox(10, 30, null, null, "Must hit section", 100);
check_mustHitSection.name = 'check_mustHit';
check_mustHitSection.checked = true;
@ -184,6 +189,7 @@ class ChartingState extends MusicBeatState
tab_group_section.add(stepperLength);
tab_group_section.add(check_mustHitSection);
tab_group_section.add(copyButton);
UI_box.addGroup(tab_group_section);
}
@ -392,6 +398,18 @@ class ChartingState extends MusicBeatState
}
}
function copySection()
{
var daSec = FlxMath.maxInt(curSection, 1);
for (note in _song.notes[daSec - 1].notes)
{
_song.notes[daSec].notes.push([note[0] + Conductor.stepCrochet * _song.notes[daSec].lengthInSteps, note[1]]);
}
updateGrid();
}
function updateSectionUI():Void
{
var sec = _song.notes[curSection];
@ -445,7 +463,7 @@ class ChartingState extends MusicBeatState
private function addNote():Void
{
_song.notes[curSection].notes.push([
Math.round(getStrumTime(dummyArrow.y) + (curSection * (Conductor.stepCrochet * 32))),
Math.round(getStrumTime(dummyArrow.y) + (curSection * (Conductor.stepCrochet * 16))),
Math.floor(FlxG.mouse.x / GRID_SIZE)
]);

View File

@ -270,11 +270,8 @@ class PlayState extends MusicBeatState
sectionScores[1].push(0);
var daStrumTime:Float = songNotes[0];
trace(daStrumTime);
var daNoteData:Int = songNotes[1];
// var daStrumTime:Float = daStrumTime;
var oldNote:Note;
if (unspawnNotes.length > 0)
oldNote = unspawnNotes[Std.int(unspawnNotes.length - 1)];
@ -572,13 +569,13 @@ class PlayState extends MusicBeatState
{
switch (Math.abs(daNote.noteData))
{
case 1:
dad.playAnim('singUP');
case 2:
dad.playAnim('singRIGHT');
dad.playAnim('singUP');
case 3:
dad.playAnim('singRIGHT');
case 1:
dad.playAnim('singDOWN');
case 4:
case 0:
dad.playAnim('singLEFT');
}