Skip to content
Snippets Groups Projects
Commit 45028c94 authored by Drahomír Karchňák's avatar Drahomír Karchňák
Browse files

#555 Added positive feedback sound on clicking correct arrow

parent 583d4ff9
Branches feature-kidnapping2
Tags
No related merge requests found
File added
......@@ -304,13 +304,10 @@ public class KidnappingGame extends AbstractTablexiaGame<GameState> {
for (final Arrow arr : arrows) {
arr.setDisabled(true);
}
sfxLibrary.getSound(SoundType.SOUND_CORRECT).play();
map.getReplayButton().setVisible(false);
map.addAction(Actions.sequence(CorrectAlphaAction.fadeIn(), CorrectAlphaAction.fadeOut(), ShowArrowAction.arrowsFadeOut(arrows), Actions.run(new Runnable() {
@Override
public void run() {
correct();
}
})));
map.addAction(Actions.sequence(CorrectAlphaAction.fadeIn(), CorrectAlphaAction.fadeOut(), ShowArrowAction.arrowsFadeOut(arrows)));
correct();
} else {
sfxLibrary.getSound(SoundType.SOUND_ERROR).play();
map.addAction(Actions.sequence(WrongAlphaAction.fadeIn(), WrongAlphaAction.fadeOut()));
......
......@@ -28,7 +28,9 @@ import cz.nic.tablexia.game.common.media.AssetDescription;
*/
public enum SoundType implements AssetDescription {
SOUND_ERROR("error", SoundClass.SOUND, true); //
SOUND_CORRECT("correct", SoundClass.SOUND, true),
SOUND_ERROR("error", SoundClass.SOUND, true);
public enum SoundClass {
SOUND, MUSIC;
......
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