diff options
| author | ilotterytea <iltsu@alright.party> | 2024-05-29 21:59:07 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2024-05-29 21:59:07 +0500 |
| commit | bbf349ed33ab4d2876c038392bac0591426da42e (patch) | |
| tree | 7f55251fb764d60b402bfc8c0b0c2508670c188c /core/src/com/ilotterytea/maxoning/player | |
| parent | efac9a5bc2470167bd9744b95aaa45d3fab4e75d (diff) | |
feat: increase points on player click
Diffstat (limited to 'core/src/com/ilotterytea/maxoning/player')
| -rw-r--r-- | core/src/com/ilotterytea/maxoning/player/DecalPlayer.java | 6 |
1 files changed, 5 insertions, 1 deletions
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++; } } |
