diff --git a/core/assets/sounds/colourchange.mp3 b/core/assets/sounds/colourchange.mp3 new file mode 100644 index 0000000..61bb357 Binary files /dev/null and b/core/assets/sounds/colourchange.mp3 differ diff --git a/core/assets/sounds/jumping.mp3 b/core/assets/sounds/jumping.mp3 index b8e4d86..16cc1b3 100644 Binary files a/core/assets/sounds/jumping.mp3 and b/core/assets/sounds/jumping.mp3 differ diff --git a/core/src/com/game/Screens/Loading.java b/core/src/com/game/Screens/Loading.java index 6745880..a4ad47c 100644 --- a/core/src/com/game/Screens/Loading.java +++ b/core/src/com/game/Screens/Loading.java @@ -112,6 +112,7 @@ public class Loading extends AbstractScreen { app.assets.load("textures/player_blue.png", Texture.class); app.assets.load("sounds/jumping.mp3", Sound.class); + app.assets.load("sounds/colourchange.mp3", Sound.class); app.assets.load("music/TheComplex.mp3", Music.class); } diff --git a/core/src/com/game/Screens/Play.java b/core/src/com/game/Screens/Play.java index 79a7b45..1ae951a 100644 --- a/core/src/com/game/Screens/Play.java +++ b/core/src/com/game/Screens/Play.java @@ -79,6 +79,7 @@ public class Play extends AbstractScreen { private int levelNumber; private Sound jumpSound = Gdx.audio.newSound(Gdx.files.internal("sounds/jumping.mp3")); + private Sound colourchangeSound = Gdx.audio.newSound(Gdx.files.internal("sounds/colourchange.mp3")); public Play(App app, int levelNumber) { super(app); @@ -178,7 +179,7 @@ public class Play extends AbstractScreen { public void handleInput() { if(Gdx.input.isKeyPressed(Input.Keys.SPACE)) { - //jumpSound.play(); //TODO, fix sound? + jumpSound.play(); player.jump(); } @@ -190,16 +191,19 @@ public class Play extends AbstractScreen { if(Gdx.input.isKeyJustPressed(Input.Keys.NUM_1)) { + colourchangeSound.play(); player.setCurColour(Base.Colours.RED); } if(Gdx.input.isKeyJustPressed(Input.Keys.NUM_2)) { + colourchangeSound.play(); player.setCurColour(Base.Colours.GREEN); } if(Gdx.input.isKeyJustPressed(Input.Keys.NUM_3)) { + colourchangeSound.play(); player.setCurColour(Base.Colours.BLUE); }