diff options
Diffstat (limited to 'core/src/com/ilotterytea')
3 files changed, 57 insertions, 0 deletions
diff --git a/core/src/com/ilotterytea/maxoning/player/MaxonItem.java b/core/src/com/ilotterytea/maxoning/player/MaxonItem.java new file mode 100644 index 0000000..b7347ef --- /dev/null +++ b/core/src/com/ilotterytea/maxoning/player/MaxonItem.java @@ -0,0 +1,19 @@ +package com.ilotterytea.maxoning.player; + +import com.ilotterytea.maxoning.ui.AnimatedImage; + +public class MaxonItem { + public String name; + public String desc; + public AnimatedImage icon; + public MaxonItemEnum type; + public float price; + + public MaxonItem(String name, String desc, AnimatedImage icon, MaxonItemEnum type, float price) { + this.name = name; + this.desc = desc; + this.icon = icon; + this.type = type; + this.price = price; + } +}
\ No newline at end of file diff --git a/core/src/com/ilotterytea/maxoning/player/MaxonItemEnum.java b/core/src/com/ilotterytea/maxoning/player/MaxonItemEnum.java new file mode 100644 index 0000000..06b5484 --- /dev/null +++ b/core/src/com/ilotterytea/maxoning/player/MaxonItemEnum.java @@ -0,0 +1,7 @@ +package com.ilotterytea.maxoning.player; + +public enum MaxonItemEnum { + DUMMY, + BUFF, + SLAVE +} diff --git a/core/src/com/ilotterytea/maxoning/player/MaxonItemRegister.java b/core/src/com/ilotterytea/maxoning/player/MaxonItemRegister.java new file mode 100644 index 0000000..1ac3e93 --- /dev/null +++ b/core/src/com/ilotterytea/maxoning/player/MaxonItemRegister.java @@ -0,0 +1,31 @@ +package com.ilotterytea.maxoning.player; + +import com.ilotterytea.maxoning.ui.AnimatedImage; + +import java.util.HashMap; +import java.util.Map; + +public class MaxonItemRegister { + private static Map<Integer, MaxonItem> items = new HashMap<>(); + + public static void register( + int id, + String name, + String desc, + AnimatedImage icon, + MaxonItemEnum type, + float price + ) { + items.put(id, new MaxonItem(name, desc, icon, type, price)); + } + + public static void unRegister( + int id + ) { + items.remove(id); + } + + public static Map<Integer, MaxonItem> getItems() { return items; } + public static MaxonItem get(int id) { return items.get(id); } + public static boolean contains(int id) { return items.containsKey(id); } +} |
