From a76f96e6d6e5ffdfa610328cb30714caf9a453d1 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Mon, 10 Jun 2024 01:35:53 +0500 Subject: feat: purr on player click --- core/src/kz/ilotterytea/maxon/player/DecalPlayer.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core') 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(); } } -- cgit v1.2.3