Skip to content

Commit

Permalink
simply judgement optimization
Browse files Browse the repository at this point in the history
thanks to ari. the previous code sucked and was bad, this makes it less bad hopefully
  • Loading branch information
pixloen committed Sep 27, 2021
1 parent b2d67a3 commit fee07af
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions source/gameFolder/meta/state/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ class PlayState extends MusicBeatState

public static var health:Float = 1; // mario
public static var combo:Int = 0;
// store judgement counts
public static var misses:Int = 0;

public static var judgeCount:Array<Int>;

public var generatedMusic:Bool = false;

Expand Down Expand Up @@ -1068,9 +1071,11 @@ class PlayState extends MusicBeatState
var score:Int = 50;

// notesplashes
if (baseRating == "sick") // create the note splash if you hit a sick
if (baseRating == "sick")
// create the note splash if you hit a sick
createSplash(coolNote, strumline);
else // if it isn't a sick, and you had a sick combo, then it becomes not sick :(
else
// if it isn't a sick, and you had a sick combo, then it becomes not sick :(
if (allSicks)
allSicks = false;

Expand Down Expand Up @@ -1103,14 +1108,8 @@ class PlayState extends MusicBeatState
// deletes all combo sprites prior to initalizing new ones
if (lastCombo != null)
{
for (i in 0...lastCombo.length - 1)
{
lastCombo[i].kill();
lastCombo.remove(lastCombo[i]);
}
if (lastCombo.length == 1)
while (lastCombo.length > 0)
{
//this part is very jank, but it works
lastCombo[0].kill();
lastCombo.remove(lastCombo[0]);
}
Expand Down Expand Up @@ -1150,9 +1149,8 @@ class PlayState extends MusicBeatState
if (Init.trueSettings.get('Fixed Judgements'))
{
numScore.cameras = [camHUD];
numScore.x += 100;
numScore.y += 50;
} else
}
numScore.x += 100;
}
}
Expand Down Expand Up @@ -1453,7 +1451,9 @@ class PlayState extends MusicBeatState
Highscore.saveScore(SONG.song, songScore, storyDifficulty);

if (!isStoryMode)
{
Main.switchState(this, new FreeplayState());
}
else
{
// set the campaign's score higher
Expand Down

0 comments on commit fee07af

Please sign in to comment.