From 8cc35dda85723fede8a5a6c938d424861f1120df Mon Sep 17 00:00:00 2001 From: Antoine Date: Thu, 24 Jun 2021 01:37:07 +0200 Subject: [PATCH] WavyText between round --- src/gameplay/match/match.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/gameplay/match/match.java b/src/gameplay/match/match.java index 8910355..819ca17 100644 --- a/src/gameplay/match/match.java +++ b/src/gameplay/match/match.java @@ -135,13 +135,15 @@ public class match { String victoryTxt = roundP1 ? "Player1 won the round" : "Player2 won the round"; System.out.println(victoryTxt); - roundWon = new UIElementText(victoryTxt, 5f, 0.25f, 0.5f, 100f, engine); + roundWon = new UIElementText(victoryTxt, 5f, 0.25f, 0.5f, 200f, engine); + roundWon.setShader("shaders/StylishShaders/WavyTextVert.glsl", "shaders/StylishShaders/TextFrag.glsl", true, true); engine.add_uiElement(roundWon); - engine.update(); - engine.render(); - - glfwWaitEventsTimeout(1); + timeStamp1 = System.currentTimeMillis(); + while(System.currentTimeMillis() - timeStamp1 < 2500){ + engine.update(); + engine.render(); + } engine.remove_uiElement(roundWon);