public static void load(GLGame game) { background = new Texture(game, "background.png"); backgroundGame = new Texture(game, "backgroundgame.png"); backgroundRegion = new TextureRegion(background, 0, 0, 960, 640); backgroundRegionGame = new TextureRegion(background, 0, 0, 960, 640); items = new Texture(game, "items.png"); // text = new Texture(game, "text.png"); font = new Font(items, 224 * 2, 0, 16, 16 * 2, 20 * 2); // Correctly mapped gameOver = new TextureRegion(items, 735, 541, 253, 72); ready = new TextureRegion(items, 655, 449, 354, 71); logo = new TextureRegion(items, 0, 730, 552, 292); mainMenu = new TextureRegion(items, 56, 457, 480, 271); highScoresRegion = new TextureRegion(items, 581, 730, 397, 86); pauseMenu = new TextureRegion(items, 465, 290, 346, 134); UIcircle = new TextureRegion(items, 594, 831, 177, 177); glowBall = new TextureRegion(items, 891, 640, 77, 77); // untouched mappings soundOff = new TextureRegion(items, 0, 0, 64 * 2, 64 * 2); soundOn = new TextureRegion(items, 64 * 2, 0, 64 * 2, 64 * 2); arrow = new TextureRegion(items, 0, 64 * 2, 64 * 2, 64 * 2); pause = new TextureRegion(items, 64 * 2, 64 * 2, 64 * 2, 64 * 2); coinAnim = new Animation( 0.2f, new TextureRegion(items, 128 * 2, 32 * 2, 32 * 2, 32 * 2), new TextureRegion(items, 160 * 2, 32 * 2, 32 * 2, 32 * 2), new TextureRegion(items, 192 * 2, 32 * 2, 32 * 2, 32 * 2), new TextureRegion(items, 160 * 2, 32 * 2, 32 * 2, 32 * 2)); glowyJump = new Animation( 0.2f, new TextureRegion(items, 0, 128 * 2, 64, 64), new TextureRegion(items, 64, 128 * 2, 64, 64)); glowyFall = new Animation( 0.2f, new TextureRegion(items, 128, 128 * 2, 64, 64), new TextureRegion(items, 192, 128 * 2, 64, 64)); glowyHit = new TextureRegion(items, 256, 128 * 2, 64, 64); starFly = new Animation( 0.2f, new TextureRegion(items, 0, 160 * 2, 32 * 2, 32 * 2), new TextureRegion(items, 32 * 2, 160 * 2, 32 * 2, 32 * 2)); platform = new TextureRegion(items, 64 * 2, 160 * 2, 64 * 2, 16 * 2); brakingPlatform = new Animation( 0.2f, new TextureRegion(items, 64 * 2, 160 * 2, 64 * 2, 16 * 2), new TextureRegion(items, 64 * 2, 176 * 2, 64 * 2, 16 * 2), new TextureRegion(items, 64 * 2, 192 * 2, 64 * 2, 16 * 2), new TextureRegion(items, 64 * 2, 208 * 2, 64 * 2, 16 * 2)); music = game.getAudio().newMusic("music.mp3"); music.setLooping(true); music.setVolume(0.3f); if (Settings.soundEnabled) music.play(); jumpSound = game.getAudio().newSound("jump.ogg"); highJumpSound = game.getAudio().newSound("highjump.ogg"); hitSound = game.getAudio().newSound("hit.ogg"); coinSound = game.getAudio().newSound("coin.ogg"); clickSound = game.getAudio().newSound("click.ogg"); }
public static void reload() { background.reload(); items.reload(); if (Settings.soundEnabled) music.play(); }