summaryrefslogtreecommitdiff
path: root/core/src/kz/ilotterytea/maxon/pets
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2024-06-10 00:04:33 +0500
committerilotterytea <iltsu@alright.party>2024-06-10 00:04:33 +0500
commit5bb8db06b01524bee613776cb9896a85ecbe2862 (patch)
tree035ea25b3c6ea6e0f793ec570805975ff9c0a147 /core/src/kz/ilotterytea/maxon/pets
parent8833419a56c090fc357ee483556428196d26ed67 (diff)
feat: render pet bros
Diffstat (limited to 'core/src/kz/ilotterytea/maxon/pets')
-rw-r--r--core/src/kz/ilotterytea/maxon/pets/Pet.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/core/src/kz/ilotterytea/maxon/pets/Pet.java b/core/src/kz/ilotterytea/maxon/pets/Pet.java
index 4b4cb00..7c69a0b 100644
--- a/core/src/kz/ilotterytea/maxon/pets/Pet.java
+++ b/core/src/kz/ilotterytea/maxon/pets/Pet.java
@@ -2,6 +2,7 @@ package kz.ilotterytea.maxon.pets;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
+import com.badlogic.gdx.graphics.g3d.decals.Decal;
import com.badlogic.gdx.utils.GdxRuntimeException;
import kz.ilotterytea.maxon.MaxonConstants;
import kz.ilotterytea.maxon.MaxonGame;
@@ -14,15 +15,17 @@ public class Pet {
private final String id, name, description;
private final double price, multiplier;
private final AnimatedImage icon;
+ private final Decal decal;
private static final Logger logger = LoggerFactory.getLogger(Pet.class);
- private Pet(String id, String name, String description, double price, double multiplier, AnimatedImage icon) {
+ private Pet(String id, String name, String description, double price, double multiplier, AnimatedImage icon, Decal decal) {
this.id = id;
this.name = name;
this.description = description;
this.price = price;
this.multiplier = multiplier;
this.icon = icon;
+ this.decal = decal;
}
public static Pet create(String id, double price, double multiplier, int iconColumns, int iconRows) {
@@ -56,7 +59,9 @@ public class Pet {
description = "pet." + id + ".desc";
}
- return new Pet(id, name, description, price, multiplier, icon);
+ Decal decal = Decal.newDecal(0.5f, 0.5f, regions[0], true);
+
+ return new Pet(id, name, description, price, multiplier, icon, decal);
}
public String getId() {
@@ -82,4 +87,8 @@ public class Pet {
public AnimatedImage getIcon() {
return icon;
}
+
+ public Decal getDecal() {
+ return decal;
+ }
}