Commit 7aafe111 authored by MAhrens's avatar MAhrens
Browse files

Sound added when Ready box checked

parent 97fad971
......@@ -91,6 +91,7 @@ public class FrozenNumbersGame extends ApplicationAdapter {
assets.load("snd/shot.mp3", Sound.class);
assets.load("snd/theme.ogg", Music.class);
assets.load("snd/pop.mp3", Sound.class);
assets.load("snd/pat.mp3", Sound.class);
assets.finishLoading();
......
......@@ -91,6 +91,7 @@ public class MainMenuScreen implements Screen {
p1_ready.setTexture(FrozenNumbersGame.assets.get("sprites/btn_ready_inactive.png", Texture.class));
p1_ready.setColor(1, 1, 1, 1);
}
FrozenNumbersGame.assets.get("snd/pat.mp3", Sound.class).play();
}
//Clicking Ready Button p2
if (p2_ready.getBoundingRectangle().contains(touchPoint.x, touchPoint.y)) {
......@@ -99,10 +100,12 @@ public class MainMenuScreen implements Screen {
if (p2_isready) {
p2_ready.setTexture(FrozenNumbersGame.assets.get("sprites/btn_ready_active.png", Texture.class));
p2_ready.setColor(0, 0.8f, 0, 1);
FrozenNumbersGame.assets.get("snd/pat.mp3", Sound.class).play();
} else {
p2_ready.setTexture(FrozenNumbersGame.assets.get("sprites/btn_ready_inactive.png", Texture.class));
p2_ready.setColor(1, 1, 1, 1);
}
FrozenNumbersGame.assets.get("snd/pat.mp3", Sound.class).play();
}
//clicking questionmark buttons
if ((p1_quest.getBoundingRectangle().contains(touchPoint.x, touchPoint.y))
......
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