diff --git a/source/funkin/Note.hx b/source/funkin/Note.hx index 433a1e727..566b4ea49 100644 --- a/source/funkin/Note.hx +++ b/source/funkin/Note.hx @@ -1,11 +1,12 @@ package funkin; -import funkin.util.Constants; import flixel.FlxSprite; import flixel.math.FlxMath; +import funkin.play.PlayState; +import funkin.play.Strumline.StrumlineStyle; import funkin.shaderslmfao.ColorSwap; import funkin.ui.PreferencesMenu; -import funkin.play.PlayState; +import funkin.util.Constants; using StringTools; @@ -93,7 +94,10 @@ class Note extends FlxSprite // anything below sick threshold is sick public static var arrowColors:Array = [1, 1, 1, 1]; - public function new(strumTime:Float = 0, noteData:NoteType, ?prevNote:Note, ?sustainNote:Bool = false) + // Which note asset to load? + public var style:StrumlineStyle = NORMAL; + + public function new(strumTime:Float = 0, noteData:NoteType, ?prevNote:Note, ?sustainNote:Bool = false, ?style:StrumlineStyle = NORMAL) { super(); @@ -110,10 +114,15 @@ class Note extends FlxSprite data.noteData = noteData; + this.style = style; + + if (this.style == null) + this.style = StrumlineStyle.NORMAL; + // TODO: Make this logic more generic - switch (PlayState.instance.currentStageId) + switch (this.style) { - case 'school' | 'schoolEvil': + case PIXEL: loadGraphic(Paths.image('weeb/pixelUI/arrows-pixels'), true, 17, 17); animation.add('greenScroll', [6]); diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index be8229e16..0380ef52b 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -862,7 +862,18 @@ class PlayState extends MusicBeatState implements IHook else oldNote = null; - var swagNote:Note = new Note(daStrumTime, daNoteData, oldNote); + var strumlineStyle:StrumlineStyle = NORMAL; + + // TODO: Put this in the chart or something? + switch (currentStageId) + { + case 'school': + strumlineStyle = PIXEL; + case 'schoolEvil': + strumlineStyle = PIXEL; + } + + var swagNote:Note = new Note(daStrumTime, daNoteData, oldNote, false, strumlineStyle); // swagNote.data = songNotes; swagNote.data.sustainLength = songNotes.sustainLength; swagNote.data.altNote = songNotes.altNote; @@ -877,7 +888,8 @@ class PlayState extends MusicBeatState implements IHook { oldNote = inactiveNotes[Std.int(inactiveNotes.length - 1)]; - var sustainNote:Note = new Note(daStrumTime + (Conductor.stepCrochet * susNote) + Conductor.stepCrochet, daNoteData, oldNote, true); + var sustainNote:Note = new Note(daStrumTime + (Conductor.stepCrochet * susNote) + Conductor.stepCrochet, daNoteData, oldNote, true, + strumlineStyle); sustainNote.scrollFactor.set(); inactiveNotes.push(sustainNote);