public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException { Instructions.draw(0, 0); move.draw(450, 120); slash.draw(450, 200); baddy.draw(450, 300); if (slash.getFrame() == 1) { g.drawImage(new Image("res/Link/Sword (right 2).png"), 490, 200); } }
/** * @see org.newdawn.slick.state.BasicGameState#render(org.newdawn.slick.GameContainer, * org.newdawn.slick.state.StateBasedGame, org.newdawn.slick.Graphics) */ public void render(GameContainer container, StateBasedGame game, Graphics g) { // Hintergrund rendern background.draw(0, 0); g.setFont(font); g.setColor(Color.white); g.drawString("GAME PAUSED", container.getWidth() / 2 - (font.getWidth("GAME PAUSED") / 2), 180); for (int i = 0; i < options.length; i++) { g.setColor(Color.white); if (selected == i) { g.setColor(Color.red); // g.drawRect(200, 390 + (i * 50), 400, 50); } g.drawString(options[i], 400 - (font.getWidth(options[i]) / 2), 230 + (i * 50)); } }