From c3e365d988e3239faf0aef65cac87574b91c332d Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Wed, 31 Aug 2022 03:17:27 +0600 Subject: класс игрока MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ilotterytea/maxoning/player/MaxonPlayer.java | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 core/src/com/ilotterytea/maxoning/player/MaxonPlayer.java (limited to 'core/src/com/ilotterytea/maxoning/player') diff --git a/core/src/com/ilotterytea/maxoning/player/MaxonPlayer.java b/core/src/com/ilotterytea/maxoning/player/MaxonPlayer.java new file mode 100644 index 0000000..01353bf --- /dev/null +++ b/core/src/com/ilotterytea/maxoning/player/MaxonPlayer.java @@ -0,0 +1,26 @@ +package com.ilotterytea.maxoning.player; + +import java.io.Serializable; +import java.util.ArrayList; + +public class MaxonPlayer implements Serializable { + public float points; + public float multiplier; + public ArrayList purchasedItems; + + public MaxonPlayer() { + this.points = 0; + this.multiplier = 1.2f; + this.purchasedItems = new ArrayList<>(); + } + + public void load(MaxonPlayer player) { + if (player != null) { + this.points = player.points; + this.multiplier = player.multiplier; + + this.purchasedItems.clear(); + this.purchasedItems.addAll(player.purchasedItems); + } + } +} -- cgit v1.2.3