Merge remote-tracking branch 'origin/master'

This commit is contained in:
no 2021-06-24 13:52:36 +02:00
commit 0487541b33
2 changed files with 12 additions and 2 deletions

View File

@ -87,6 +87,7 @@ public class match {
private static float slowFactor = 1f;
private static long timeStampFpsCounter;
private static int frameCounter;
private static int roundCounter=0;
private static Sprite objP1,objP2;
private static Engine engine;
@ -127,7 +128,8 @@ public class match {
* Used for playing animations and such.
*/
private static void endRound() {
String victoryTxt = roundP1 ? "Player1 won the round" : "Player2 won the round";
roundCounter++;
String victoryTxt = roundP1 ? "Player1 won the round"+roundCounter : "Player2 won the round"+roundCounter;
System.out.println(victoryTxt);
roundWon = new UIElementText(victoryTxt, 5f, 0.25f, 0.5f, 200f, engine);
@ -339,7 +341,7 @@ public class match {
//end round
case 11:
endRound();
if(roundsWonP1 >= 2 || roundsWonP2 >= 2) { endMatch();} //TODO : will probably need to specify more
if(roundsWonP1 >= (rounds/2 +1) || roundsWonP2 >= (rounds/2 +1)) { endMatch();} //TODO : will probably need to specify more
acCode = 0;
break;

View File

@ -95,6 +95,14 @@ public class Settings {
System.exit(1);
} catch (ParseException e) {
System.out.println("Invalid config file");
rounds = 3;
p1 = "default";
p2 = "default";
width = 800;
height = 600;
fullscreen = false;
hitboxes = false;
stage = "default";
}
}