summaryrefslogtreecommitdiff
path: root/shared/src/main/java/kz/ilotterytea/frogartha/domain/PlayerState.java
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-01-22 00:40:57 +0500
committerilotterytea <iltsu@alright.party>2025-01-22 00:41:39 +0500
commita7f77c115bc95eb8a667df1146cc26dc17367879 (patch)
tree77b08b0cb4f07f9b3d21c277d5621bd0ee5a488c /shared/src/main/java/kz/ilotterytea/frogartha/domain/PlayerState.java
parente4997681a2d08adc9b9055b0b2a1dc52d54edd47 (diff)
feat: player jumps like a frog!!! (FROGartha reference) + player state
Diffstat (limited to 'shared/src/main/java/kz/ilotterytea/frogartha/domain/PlayerState.java')
-rw-r--r--shared/src/main/java/kz/ilotterytea/frogartha/domain/PlayerState.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/shared/src/main/java/kz/ilotterytea/frogartha/domain/PlayerState.java b/shared/src/main/java/kz/ilotterytea/frogartha/domain/PlayerState.java
new file mode 100644
index 0000000..15ba015
--- /dev/null
+++ b/shared/src/main/java/kz/ilotterytea/frogartha/domain/PlayerState.java
@@ -0,0 +1,42 @@
+package kz.ilotterytea.frogartha.domain;
+
+import com.badlogic.gdx.math.Vector3;
+
+public class PlayerState {
+ private final Vector3 position, direction;
+ private float nextJumpTimestamp;
+
+ public PlayerState() {
+ this(new Vector3(), new Vector3());
+ }
+
+ public PlayerState(Vector3 position, Vector3 direction) {
+ this.position = position;
+ this.direction = direction;
+ this.nextJumpTimestamp = 0;
+ }
+
+ public Vector3 getPosition() {
+ return position;
+ }
+
+ public void setPosition(float x, float y, float z) {
+ this.position.set(x, y, z);
+ }
+
+ public Vector3 getDirection() {
+ return direction;
+ }
+
+ public float getNextJumpTimestamp() {
+ return nextJumpTimestamp;
+ }
+
+ public void setNextJumpTimestamp(float nextJumpTimestamp) {
+ this.nextJumpTimestamp = nextJumpTimestamp;
+ }
+
+ public void setDirection(float x, float y, float z) {
+ this.position.set(x, y, z);
+ }
+}