make claps based on time instead of y positions

This commit is contained in:
KadeDeveloper 2021-08-13 15:00:37 -07:00
parent b749f10957
commit 94b6cba78d

View File

@ -2134,16 +2134,10 @@ class ChartingState extends MusicBeatState
{ {
curRenderedNotes.forEach(function(note:Note) curRenderedNotes.forEach(function(note:Note)
{ {
if (FlxG.sound.music.playing) if (note.strumTime <= Conductor.songPosition && !claps.contains(note))
{ {
if (strumLine.overlaps(note)) claps.push(note);
{ FlxG.sound.play(Paths.sound('SNAP'));
if(!claps.contains(note))
{
claps.push(note);
FlxG.sound.play(Paths.sound('SNAP'));
}
}
} }
}); });
} }