Merge pull request #1135 from NeeEoo/fix-chart-note-bugs
Fixed not being able to select notes, and fixed the delete note bug.
This commit is contained in:
commit
6cbb7b2809
@ -1240,6 +1240,7 @@ class ChartingState extends MusicBeatState
|
|||||||
var daSus = i[2];
|
var daSus = i[2];
|
||||||
|
|
||||||
var note:Note = new Note(daStrumTime, daNoteInfo % 4,null,false,true);
|
var note:Note = new Note(daStrumTime, daNoteInfo % 4,null,false,true);
|
||||||
|
note.rawNoteData = daNoteInfo;
|
||||||
note.sustainLength = daSus;
|
note.sustainLength = daSus;
|
||||||
note.setGraphicSize(GRID_SIZE, GRID_SIZE);
|
note.setGraphicSize(GRID_SIZE, GRID_SIZE);
|
||||||
note.updateHitbox();
|
note.updateHitbox();
|
||||||
@ -1282,7 +1283,7 @@ class ChartingState extends MusicBeatState
|
|||||||
|
|
||||||
for (i in _song.notes[curSection].sectionNotes)
|
for (i in _song.notes[curSection].sectionNotes)
|
||||||
{
|
{
|
||||||
if (i.strumTime == note.strumTime && i.noteData % 4 == note.noteData)
|
if (i[0] == note.strumTime && i[1] == note.rawNoteData)
|
||||||
{
|
{
|
||||||
curSelectedNote = _song.notes[curSection].sectionNotes[swagNum];
|
curSelectedNote = _song.notes[curSection].sectionNotes[swagNum];
|
||||||
}
|
}
|
||||||
@ -1300,7 +1301,7 @@ class ChartingState extends MusicBeatState
|
|||||||
lastNote = note;
|
lastNote = note;
|
||||||
for (i in _song.notes[curSection].sectionNotes)
|
for (i in _song.notes[curSection].sectionNotes)
|
||||||
{
|
{
|
||||||
if (i[0] == note.strumTime && i[1] % 4 == note.noteData)
|
if (i[0] == note.strumTime && i[1] == note.rawNoteData)
|
||||||
{
|
{
|
||||||
_song.notes[curSection].sectionNotes.remove(i);
|
_song.notes[curSection].sectionNotes.remove(i);
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ class Note extends FlxSprite
|
|||||||
|
|
||||||
public var mustPress:Bool = false;
|
public var mustPress:Bool = false;
|
||||||
public var noteData:Int = 0;
|
public var noteData:Int = 0;
|
||||||
|
public var rawNoteData:Int = 0;
|
||||||
public var canBeHit:Bool = false;
|
public var canBeHit:Bool = false;
|
||||||
public var tooLate:Bool = false;
|
public var tooLate:Bool = false;
|
||||||
public var wasGoodHit:Bool = false;
|
public var wasGoodHit:Bool = false;
|
||||||
|
@ -2,7 +2,7 @@ package;
|
|||||||
|
|
||||||
typedef SwagSection =
|
typedef SwagSection =
|
||||||
{
|
{
|
||||||
var sectionNotes:Array<Dynamic>;
|
var sectionNotes:Array<Array<Dynamic>>;
|
||||||
var lengthInSteps:Int;
|
var lengthInSteps:Int;
|
||||||
var typeOfSection:Int;
|
var typeOfSection:Int;
|
||||||
var mustHitSection:Bool;
|
var mustHitSection:Bool;
|
||||||
@ -13,7 +13,7 @@ typedef SwagSection =
|
|||||||
|
|
||||||
class Section
|
class Section
|
||||||
{
|
{
|
||||||
public var sectionNotes:Array<Dynamic> = [];
|
public var sectionNotes:Array<Array<Dynamic>> = [];
|
||||||
|
|
||||||
public var lengthInSteps:Int = 16;
|
public var lengthInSteps:Int = 16;
|
||||||
public var typeOfSection:Int = 0;
|
public var typeOfSection:Int = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user