mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-26 22:56:48 +00:00
almost got sustains working
This commit is contained in:
parent
bc367a08dc
commit
06ef3c8529
|
@ -62,7 +62,10 @@ class ChartingState extends MusicBeatState
|
||||||
var _song:Song;
|
var _song:Song;
|
||||||
|
|
||||||
var typingShit:FlxInputText;
|
var typingShit:FlxInputText;
|
||||||
var curSelectedNote:Note = new Note(0, 0, null);
|
/*
|
||||||
|
* WILL BE THE CURRENT / LAST PLACED NOTE
|
||||||
|
**/
|
||||||
|
var curSelectedNote:Array<Dynamic>;
|
||||||
|
|
||||||
override function create()
|
override function create()
|
||||||
{
|
{
|
||||||
|
@ -330,6 +333,7 @@ class ChartingState extends MusicBeatState
|
||||||
{
|
{
|
||||||
if (FlxG.mouse.overlaps(note))
|
if (FlxG.mouse.overlaps(note))
|
||||||
{
|
{
|
||||||
|
trace('tryin to delete note...');
|
||||||
deleteNote(note);
|
deleteNote(note);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -501,9 +505,6 @@ class ChartingState extends MusicBeatState
|
||||||
var daStrumTime = i[0];
|
var daStrumTime = i[0];
|
||||||
var daSus = i[2];
|
var daSus = i[2];
|
||||||
|
|
||||||
if (daSus == null)
|
|
||||||
i[2] == 0;
|
|
||||||
|
|
||||||
var note:Note = new Note(daStrumTime, daNoteInfo % 4);
|
var note:Note = new Note(daStrumTime, daNoteInfo % 4);
|
||||||
note.sustainLength = daSus;
|
note.sustainLength = daSus;
|
||||||
note.setGraphicSize(GRID_SIZE, GRID_SIZE);
|
note.setGraphicSize(GRID_SIZE, GRID_SIZE);
|
||||||
|
@ -512,6 +513,13 @@ class ChartingState extends MusicBeatState
|
||||||
note.y = getYfromStrum(daStrumTime) % gridBG.height;
|
note.y = getYfromStrum(daStrumTime) % gridBG.height;
|
||||||
|
|
||||||
curRenderedNotes.add(note);
|
curRenderedNotes.add(note);
|
||||||
|
|
||||||
|
if (daSus > 0)
|
||||||
|
{
|
||||||
|
var sustainVis:FlxSprite = new FlxSprite(note.x,
|
||||||
|
note.y).makeGraphic(8, Math.floor(FlxMath.remapToRange(daSus, 0, Conductor.stepCrochet * 16, 0, gridBG.height)));
|
||||||
|
curRenderedSustains.add(sustainVis);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -536,10 +544,13 @@ class ChartingState extends MusicBeatState
|
||||||
|
|
||||||
private function addNote():Void
|
private function addNote():Void
|
||||||
{
|
{
|
||||||
var swagNote:NoteMeta = new NoteMeta(Math.round(getStrumTime(dummyArrow.y) + (curSection * (Conductor.stepCrochet * 16))),
|
var noteStrum = Math.round(getStrumTime(dummyArrow.y) + (curSection * (Conductor.stepCrochet * 16)));
|
||||||
Math.floor(FlxG.mouse.x / GRID_SIZE), 0);
|
var noteData = Math.floor(FlxG.mouse.x / GRID_SIZE);
|
||||||
|
var noteSus = 0;
|
||||||
|
|
||||||
_song.notes[curSection].sectionNotes.push(swagNote);
|
_song.notes[curSection].sectionNotes.push([noteStrum, noteData, noteSus]);
|
||||||
|
|
||||||
|
curSelectedNote = _song.notes[curSection].sectionNotes[_song.notes[curSection].sectionNotes.length - 1];
|
||||||
|
|
||||||
trace(getStrumTime(dummyArrow.y) + (curSection * (Conductor.stepCrochet * 16)));
|
trace(getStrumTime(dummyArrow.y) + (curSection * (Conductor.stepCrochet * 16)));
|
||||||
trace(curSection);
|
trace(curSection);
|
||||||
|
|
Loading…
Reference in a new issue