From bbf349ed33ab4d2876c038392bac0591426da42e Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Wed, 29 May 2024 21:59:07 +0500 Subject: feat: increase points on player click --- core/src/com/ilotterytea/maxoning/player/DecalPlayer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core/src/com/ilotterytea/maxoning/player') diff --git a/core/src/com/ilotterytea/maxoning/player/DecalPlayer.java b/core/src/com/ilotterytea/maxoning/player/DecalPlayer.java index 30ee447..d7baf79 100644 --- a/core/src/com/ilotterytea/maxoning/player/DecalPlayer.java +++ b/core/src/com/ilotterytea/maxoning/player/DecalPlayer.java @@ -14,8 +14,11 @@ public class DecalPlayer { private int regionIndex; private final Decal decal; private final BoundingBox box; + private final MaxonSavegame savegame; + + public DecalPlayer(MaxonSavegame savegame, TextureRegion[] regions) { + this.savegame = savegame; - public DecalPlayer(TextureRegion[] regions) { this.regions = regions; this.regionIndex = 0; @@ -52,6 +55,7 @@ public class DecalPlayer { if (Intersector.intersectRayBounds(ray, box, intersection)) { updateTextureRegion(); + savegame.points++; } } -- cgit v1.2.3