DEADSOFTWARE

18188690f75f33a35dd2445e6ff3086681a5bd51
[cavedroid.git] / core / src / ru / deadsoftware / cavecraft / game / objects / Player.java
1 package ru.deadsoftware.cavecraft.game.objects;
3 import com.badlogic.gdx.math.Rectangle;
4 import com.badlogic.gdx.math.Vector2;
5 import ru.deadsoftware.cavecraft.Assets;
7 public class Player {
9 public Vector2 position;
10 public Vector2 moveX, moveY;
11 public int width, height, dir, texWidth;
12 public boolean canJump;
13 public int[] inventory;
14 public boolean flyMode = false;
16 public Player() {
17 position = new Vector2(0, 0);
18 moveX = new Vector2(0, 0);
19 moveY = new Vector2(0, 0);
20 width = 4;
21 height = 30;
22 texWidth = 8;
23 inventory = new int[9];
24 inventory[0] = 1;
25 inventory[1] = 2;
26 inventory[2] = 3;
27 inventory[3] = 4;
28 inventory[4] = 5;
29 inventory[5] = 6;
30 inventory[6] = 7;
31 inventory[7] = 8;
32 inventory[8] = 9;
33 }
35 public Rectangle getRect() {
36 return new Rectangle(position.x+2, position.y, width, height);
37 }
39 }