1 package ru
.deadsoftware
.cavecraft
.game
.objects
;
3 import com
.badlogic
.gdx
.math
.RandomXS128
;
4 import com
.badlogic
.gdx
.math
.Rectangle
;
5 import com
.badlogic
.gdx
.math
.Vector2
;
6 import ru
.deadsoftware
.cavecraft
.Assets
;
7 import ru
.deadsoftware
.cavecraft
.game
.WorldGen
;
11 public Vector2 position
;
12 public Vector2 moveX
, moveY
;
13 public int width
, height
, dir
, texWidth
;
14 public boolean canJump
;
15 public int[] inventory
;
16 public boolean flyMode
= false;
18 public Player(int x
, int y
) {
19 position
= new Vector2(x
, y
);
20 moveX
= new Vector2(0, 0);
21 moveY
= new Vector2(0, 0);
25 inventory
= new int[9];
37 public Rectangle
getRect() {
38 return new Rectangle(position
.x
+2, position
.y
, width
, height
);