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 static int ANIM_SPEED
= 6;
13 public Vector2 position
;
14 public Vector2 moveX
, moveY
;
15 public int width
, height
, dir
, texWidth
;
16 public boolean canJump
;
17 public int[] inventory
;
18 public boolean flyMode
= false;
20 public Player(Vector2 spawnPoint
) {
21 position
= spawnPoint
.cpy();
22 moveX
= new Vector2(0, 0);
23 moveY
= new Vector2(0, 0);
27 inventory
= new int[9];
39 public Rectangle
getRect() {
40 return new Rectangle(position
.x
+2, position
.y
, width
, height
);