summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2024-06-10 01:35:53 +0500
committerilotterytea <iltsu@alright.party>2024-06-10 01:35:53 +0500
commita76f96e6d6e5ffdfa610328cb30714caf9a453d1 (patch)
tree609c5a40c215a296c8c40c040dab8ea4c5e436fc /core
parentcaca95bab3021cffc7d5cfd504f03cab6a12c799 (diff)
feat: purr on player click
Diffstat (limited to 'core')
-rw-r--r--core/src/kz/ilotterytea/maxon/player/DecalPlayer.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/kz/ilotterytea/maxon/player/DecalPlayer.java b/core/src/kz/ilotterytea/maxon/player/DecalPlayer.java
index 60faf9b..5ce2abe 100644
--- a/core/src/kz/ilotterytea/maxon/player/DecalPlayer.java
+++ b/core/src/kz/ilotterytea/maxon/player/DecalPlayer.java
@@ -1,6 +1,7 @@
package kz.ilotterytea.maxon.player;
import com.badlogic.gdx.Gdx;
+import com.badlogic.gdx.audio.Sound;
import com.badlogic.gdx.graphics.Camera;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.graphics.g3d.decals.Decal;
@@ -8,6 +9,7 @@ import com.badlogic.gdx.math.Intersector;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.collision.BoundingBox;
import com.badlogic.gdx.math.collision.Ray;
+import kz.ilotterytea.maxon.MaxonGame;
public class DecalPlayer {
private final TextureRegion[] regions;
@@ -56,6 +58,9 @@ public class DecalPlayer {
if (Intersector.intersectRayBounds(ray, box, intersection)) {
updateTextureRegion();
savegame.increaseMoney(1);
+
+ Sound sound = MaxonGame.getInstance().assetManager.get("sfx/player/purr.ogg", Sound.class);
+ sound.play();
}
}