From 6fec9e2c7efcaa7d2d1a0370e9e89ec8f9850a50 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 22 Jan 2022 16:57:49 -0500 Subject: [PATCH] note format stuff in progress - noteData --- source/Note.hx | 7 +++---- source/PlayState.hx | 8 ++++---- source/charting/ChartingState.hx | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/source/Note.hx b/source/Note.hx index 4b78fb137..a3854fc5d 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -25,7 +25,6 @@ class Note extends FlxSprite public var mustPress:Bool = false; public var followsTime:Bool = true; // used if you want the note to follow the time shit! - public var noteData:Int = 0; public var canBeHit:Bool = false; public var tooLate:Bool = false; public var wasGoodHit:Bool = false; @@ -76,7 +75,7 @@ class Note extends FlxSprite y -= 2000; data.strumTime = strumTime; - this.noteData = noteData; + data.noteData = noteData; var daStage:String = PlayState.curStage; @@ -190,7 +189,7 @@ class Note extends FlxSprite if (prevNote.isSustainNote) { - switch (prevNote.noteData) + switch (prevNote.data.noteData) { case 0: prevNote.animation.play('purplehold'); @@ -223,7 +222,7 @@ class Note extends FlxSprite public function updateColors():Void { - colorSwap.update(arrowColors[noteData]); + colorSwap.update(arrowColors[data.noteData]); } override function update(elapsed:Float) diff --git a/source/PlayState.hx b/source/PlayState.hx index 4cdff5287..a860c3e92 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2195,7 +2195,7 @@ class PlayState extends MusicBeatState if (!daNote.isSustainNote) { - switch (Math.abs(daNote.noteData)) + switch (Math.abs(daNote.data.noteData)) { case 0: dad.playAnim('singLEFT' + altAnim, true); @@ -2429,7 +2429,7 @@ class PlayState extends MusicBeatState var healthMulti:Float = 1; - if (daNote.noteData >= 0) + if (daNote.data.noteData >= 0) healthMulti *= 0.033; else healthMulti *= 0.002; @@ -2463,7 +2463,7 @@ class PlayState extends MusicBeatState if (isSick) { var noteSplash:NoteSplash = grpNoteSplashes.recycle(NoteSplash); - noteSplash.setupNoteSplash(daNote.x, daNote.y, daNote.noteData); + noteSplash.setupNoteSplash(daNote.x, daNote.y, daNote.data.noteData); // new NoteSplash(daNote.x, daNote.y, daNote.noteData); grpNoteSplashes.add(noteSplash); } @@ -2738,7 +2738,7 @@ class PlayState extends MusicBeatState { notes.forEachAlive(function(daNote:Note) { - if (daNote.isSustainNote && daNote.canBeHit && daNote.mustPress && holdArray[daNote.noteData]) + if (daNote.isSustainNote && daNote.canBeHit && daNote.mustPress && holdArray[daNote.data.noteData]) goodNoteHit(daNote); }); } diff --git a/source/charting/ChartingState.hx b/source/charting/ChartingState.hx index 04069ee88..33e4be243 100644 --- a/source/charting/ChartingState.hx +++ b/source/charting/ChartingState.hx @@ -314,7 +314,7 @@ class ChartingState extends MusicBeatState { var note:Note = new Note(0, 0); note.data = SongLoad.getSong()[curSection].sectionNotes[i]; - note.noteData = (note.noteData + 4) % 8; + note.data.noteData = (note.data.noteData + 4) % 8; SongLoad.getSong()[curSection].sectionNotes[i] = note.data; updateGrid(); } @@ -1190,7 +1190,7 @@ class ChartingState extends MusicBeatState { for (i in SongLoad.getSong()[curSection].sectionNotes) { - if (i.strumTime == note.data.strumTime && i.noteData % 4 == note.noteData) + if (i.strumTime == note.data.strumTime && i.noteData % 4 == note.data.noteData) { var placeIDK:Int = Std.int(((Math.floor(dummyArrow.y / GRID_SIZE) * GRID_SIZE)) / 40);