summaryrefslogtreecommitdiff
path: root/shared/src/main/java/kz/ilotterytea/frogartha/domain/PlayerState.java
blob: d3bd18c4fda554623857fcc277544d715787bb76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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.direction.set(x, y, z);
    }
}