public void render() { switch (gameStatus) { case -1: break; case 1: case 2: case 9: // distance += 0.2; if (Main.game.player.funX >= GOPlayer.beginX && (gameConfiguration.playersAmount + gameConfiguration.isBot < 2)) { Draw.xshift = (float) Math.pow(Main.game.player.funX - GOPlayer.beginX, 1f); } else Draw.xshift = 0; if (distance * moveOnStep >= 20) distance = 0; Draw.draw(DrawFigure.FON2, 0, 20 * Main.ratio, 150, 60 * Main.ratio); for (GO ob : allObjects) { ob.render(); } for (GOPlayer obPlayer : players) { for (GOPoint point : obPlayer.path) { point.render(); } obPlayer.render(); } for (GO ob : obstacles) { ob.render(); } for (GOPrism bonus : bonuses) { bonus.render(); } Draw.gameInterface(); if ((gameStatus == 1) || (gameStatus == 9)) { if (changedGameStatus) Draw.wallpaper = Draw.shadowTexture; changedGameStatus = false; } else { return; } break; case 3: changedGameStatus = false; break; case 4: if (changedGameStatus) Draw.wallpaper = loadTexture("fon/textureWithShadow"); changedGameStatus = false; break; case 0: if (changedGameStatus) { Draw.wallpaper = Draw.wallTexture; changedGameStatus = false; } break; case 10: if (changedGameStatus) { Draw.wallpaper = Draw.wallTexture; changedGameStatus = false; } break; } Draw.drawWallpaper(Draw.wallpaper); selected = checkButtonIsOver(); Draw.drawContextMenu(gameStatus, selected); if (gameStatus == 3) Draw.drawTopScoreList(pg, maxPg); // Draw.drawCoords(); if (gameStatus == -1) { // Draw.drawGradient(Draw.gradient, shadowing); // System.out.println(shadowing); } else { Draw.drawFPS(); } }