diff options
| -rwxr-xr-x | assets/sfx/player/purr.ogg | bin | 0 -> 5824 bytes | |||
| -rw-r--r-- | core/src/kz/ilotterytea/maxon/player/DecalPlayer.java | 5 |
2 files changed, 5 insertions, 0 deletions
diff --git a/assets/sfx/player/purr.ogg b/assets/sfx/player/purr.ogg Binary files differnew file mode 100755 index 0000000..e4db8f1 --- /dev/null +++ b/assets/sfx/player/purr.ogg 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(); } } |
