DEADSOFTWARE

Add player animation and fly mode
[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;
6 public class Player {
8 public Vector2 position;
9 public Vector2 moveX, moveY;
10 public int width, height, dir;
11 public boolean canJump;
12 public int[] inventory;
13 public boolean flyMode = false;
15 public Player() {
16 position = new Vector2(0, 0);
17 moveX = new Vector2(0, 0);
18 moveY = new Vector2(0, 0);
19 width = 4;
20 height = 30;
21 inventory = new int[9];
22 inventory[0] = 1;
23 inventory[1] = 2;
24 inventory[2] = 3;
25 }
27 public Rectangle getRect() {
28 return new Rectangle(position.x+2, position.y, width, height);
29 }
31 }