Commit b60a029b authored by MAhrens's avatar MAhrens
Browse files

Sound moved to Main Menu and Game Over Screen

parent 9a7d2540
......@@ -3,6 +3,7 @@ package org.milderjoghurt.frozennumbers.screens;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.audio.Sound;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
......@@ -53,6 +54,8 @@ public class GameOverScreen implements Screen {
closeTop.setScale(scaleX, scaleY);
closeTop.rotate(180);
closeTop.setCenter(wWidth / 4.0f * 3.0f, wHeight / 2.0f);
FrozenNumbersGame.assets.get("snd/theme.ogg", Sound.class).loop();
}
@Override
......
......@@ -129,9 +129,7 @@ public class GameScreen implements Screen {
p1.timer = timerDefault;
p2.timer = timerDefault;
FrozenNumbersGame.assets.get("snd/theme.ogg", Sound.class).play();
//TODO: Main Game Sound
}
@Override
......
......@@ -3,6 +3,7 @@ package org.milderjoghurt.frozennumbers.screens;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.audio.Sound;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
......@@ -62,6 +63,8 @@ public class MainMenuScreen implements Screen {
p1_isready = false;
p2_isready = false;
FrozenNumbersGame.assets.get("snd/theme.ogg", Sound.class).loop();
}
@Override
......@@ -138,6 +141,7 @@ public class MainMenuScreen implements Screen {
if (p1_isready && p2_isready) {
//reset for new Game
m_Screens.put("Game", new GameScreen());
FrozenNumbersGame.assets.get("snd/theme.ogg", Sound.class).stop();
p1_ready.setTexture(FrozenNumbersGame.assets.get("sprites/btn_ready_inactive.png", Texture.class));
p2_ready.setTexture(FrozenNumbersGame.assets.get("sprites/btn_ready_inactive.png", Texture.class));
p2_ready.setColor(1, 1, 1, 1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment