endMatch évalué avant endRound

This commit is contained in:
Antoine 2021-06-25 14:40:04 +02:00
parent 2dd019a8ea
commit 68cc275302

View File

@ -162,7 +162,7 @@ public class match {
private static void endMatch() {
String victoryTxt = roundsWonP1 > roundsWonP2 ? "P1 won the match" : "P2 won the match";
matchWon = new UIElementText(victoryTxt, 5f, 0.25f, 0.5f, 200f, engine);
matchWon = new UIElementText(victoryTxt, 5f, 0.3f, 0.5f, 200f, engine);
matchWon.setShader("/shaders/StylishShaders/WavyTextVert.glsl", "/shaders/StylishShaders/TextFrag.glsl", true, true);
engine.add_uiElement(matchWon);
@ -357,8 +357,8 @@ public class match {
//end round
case 11:
if(roundsWonP1 >= (rounds/2 +1) || roundsWonP2 >= (rounds/2 +1)) { endMatch(); break;}
endRound();
if(roundsWonP1 >= (rounds/2 +1) || roundsWonP2 >= (rounds/2 +1)) { endMatch();} //TODO : will probably need to specify more
acCode = 0;
break;