summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/sfx/shop/not_enough_money.oggbin0 -> 6823 bytes
-rw-r--r--assets/sfx/shop/purchase.oggbin0 -> 13749 bytes
-rw-r--r--assets/sfx/shop/sell.oggbin0 -> 7599 bytes
-rw-r--r--core/src/kz/ilotterytea/maxon/screens/game/shop/ShopUI.java8
4 files changed, 7 insertions, 1 deletions
diff --git a/assets/sfx/shop/not_enough_money.ogg b/assets/sfx/shop/not_enough_money.ogg
new file mode 100644
index 0000000..015062d
--- /dev/null
+++ b/assets/sfx/shop/not_enough_money.ogg
Binary files differ
diff --git a/assets/sfx/shop/purchase.ogg b/assets/sfx/shop/purchase.ogg
new file mode 100644
index 0000000..e28a4cc
--- /dev/null
+++ b/assets/sfx/shop/purchase.ogg
Binary files differ
diff --git a/assets/sfx/shop/sell.ogg b/assets/sfx/shop/sell.ogg
new file mode 100644
index 0000000..fdae919
--- /dev/null
+++ b/assets/sfx/shop/sell.ogg
Binary files differ
diff --git a/core/src/kz/ilotterytea/maxon/screens/game/shop/ShopUI.java b/core/src/kz/ilotterytea/maxon/screens/game/shop/ShopUI.java
index ed29326..71af190 100644
--- a/core/src/kz/ilotterytea/maxon/screens/game/shop/ShopUI.java
+++ b/core/src/kz/ilotterytea/maxon/screens/game/shop/ShopUI.java
@@ -35,12 +35,15 @@ public class ShopUI {
private final ArrayList<PetWidget> petWidgets = new ArrayList<>();
- private final Sound clickSound;
+ private final Sound clickSound, notEnoughMoneySound, purchaseSound, sellSound;
public ShopUI(final Savegame savegame, Stage stage, Skin skin, TextureAtlas atlas) {
this.savegame = savegame;
MaxonGame game = MaxonGame.getInstance();
this.clickSound = game.assetManager.get("sfx/ui/click.ogg", Sound.class);
+ this.notEnoughMoneySound = game.assetManager.get("sfx/shop/not_enough_money.ogg", Sound.class);
+ this.purchaseSound = game.assetManager.get("sfx/shop/purchase.ogg", Sound.class);
+ this.sellSound = game.assetManager.get("sfx/shop/sell.ogg", Sound.class);
this.skin = skin;
this.atlas = atlas;
@@ -244,6 +247,7 @@ public class ShopUI {
super.clicked(event, x, y);
if (widget.isDisabled()) {
+ notEnoughMoneySound.play();
return;
}
@@ -255,6 +259,7 @@ public class ShopUI {
savegame.getPurchasedPets().getOrDefault(pet.getId(), 0)
+ multiplier.getMultiplier()
);
+ purchaseSound.play();
} else {
savegame.increaseMoney(widget.getPrice());
savegame.decreaseMultiplier(pet.getMultiplier() * multiplier.getMultiplier());
@@ -263,6 +268,7 @@ public class ShopUI {
savegame.getPurchasedPets().get(pet.getId())
- multiplier.getMultiplier()
);
+ sellSound.play();
}
}
});