@Override public void present(float deltaTime) { Graphics g = game.getGraphics(); g.drawPixmap(Assets.background, 0, 0); g.drawPixmap(Assets.help3, 64, 100); g.drawPixmap(Assets.buttons, 256, 416, 0, 64, 64, 64); }
public void update(float deltaTime) { Graphics g = game.getGraphics(); List<TouchEvent> touchEvents = game.getInput().getTouchEvents(); game.getInput().getKeyEvents(); int len = touchEvents.size(); for (int i = 0; i < len; i++) { TouchEvent event = touchEvents.get(i); if (event.type == TouchEvent.TOUCH_UP) { if (inBounds(event, 0, g.getHeight() - 64, 64, 64)) { Settings.soundEnabled = !Settings.soundEnabled; if (Settings.soundEnabled) Assets.click.play(1); } if (inBounds(event, 64, 220, 192, 42)) { game.setScreen(new GameScreen(game)); if (Settings.soundEnabled) Assets.click.play(1); return; } if (inBounds(event, 64, 220 + 42, 192, 42)) { game.setScreen(new HighscoreScreen(game)); if (Settings.soundEnabled) Assets.click.play(1); return; } if (inBounds(event, 64, 220 + 84, 192, 42)) { game.setScreen(new HelpScreen(game)); if (Settings.soundEnabled) Assets.click.play(1); return; } } } }
@Override public void present(float deltaTime) { // TODO Auto-generated method stub Graphics g = game.getGraphics(); g.drawPixmap(Assets.background, 0, 0); g.drawPixmap(Assets.help3, 64, 100); g.drawPixmap(Assets.buttons, 256, 416, 0, 64, 64, 64); }
public void present(float deltaTime) { Graphics g = game.getGraphics(); g.drawPixmap(Assets.background, 0, 0); g.drawPixmap(Assets.logo, 32, 20); g.drawPixmap(Assets.mainMenu, 64, 220); if (Settings.soundEnabled) g.drawPixmap(Assets.buttons, 0, 416, 0, 0, 64, 64); else g.drawPixmap(Assets.buttons, 0, 416, 64, 0, 64, 64); }
@Override public void present(float deltaTime) { Graphics g = game.getGraphics(); g.drawPixmap(developerLogo, 0, 0); logoDisplayed = true; }
@Override public void update(float deltaTime) { Graphics g = game.getGraphics(); Audio a = game.getAudio(); if (!logoDisplayed) developerLogo = g.newPixmap("cloubylogo.png", PixmapFormat.ARGB8888); else { Assets.background = g.newPixmap("background.png", PixmapFormat.RGB565); Assets.playerSpaceShip = g.newPixmap("playerspaceship.png", PixmapFormat.ARGB4444); Assets.basicPlayerMissle = g.newPixmap("basicplayermissle.png", PixmapFormat.ARGB4444); Assets.playButton = g.newPixmap("playbutton.png", PixmapFormat.ARGB4444); Assets.highscoreButton = g.newPixmap("highscorebutton.png", PixmapFormat.ARGB4444); Assets.backButton = g.newPixmap("backbutton.png", PixmapFormat.ARGB4444); Assets.title = g.newPixmap("title.png", PixmapFormat.ARGB4444); Assets.basicEnemy = g.newPixmap("basicenemy.png", PixmapFormat.ARGB4444); Assets.phoneOrientation = g.newPixmap("phoneorientation.png", PixmapFormat.ARGB4444); Assets.highscoreTitle = g.newPixmap("highscoretitle.png", PixmapFormat.ARGB4444); Assets.onlineTitle = g.newPixmap("onlinetitle.png", PixmapFormat.ARGB4444); Assets.localTitle = g.newPixmap("localtitle.png", PixmapFormat.ARGB4444); Assets.gameOver = g.newPixmap("gameover.png", PixmapFormat.ARGB4444); Assets.newGame = g.newPixmap("newgame.png", PixmapFormat.ARGB4444); Assets.mainMenu = g.newPixmap("mainmenu.png", PixmapFormat.ARGB4444); Assets.submitButton = g.newPixmap("mainmenu.png", PixmapFormat.ARGB4444); Assets.font = g.newTypeFace("font.ttf"); Assets.basicMissleFire = a.newSound("basicmisslefire.ogg"); Assets.forming = a.newSound("forming.ogg"); Assets.deForming = a.newSound("deforming.ogg"); Settings.updateOnlineScores(); try { Thread.sleep(2000L); } catch (InterruptedException e) { e.printStackTrace(); } game.setScreen(new GameScreen(game)); } }