summaryrefslogtreecommitdiff
path: root/shared/src/main/java/kz/ilotterytea/frogartha/domain/PlayerState.java
diff options
context:
space:
mode:
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);
+ }
+}