DEADSOFTWARE

Rename position -> pos
[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 import java.io.Serializable;
8 public class Player implements Serializable {
10 public static int ANIM_SPEED = 6;
12 public Vector2 pos;
13 public Vector2 move;
14 public int width, height, dir, texWidth;
15 public boolean canJump;
16 public int[] inv;
17 public boolean flyMode = false;
19 public Player(Vector2 spawnPoint) {
20 pos = spawnPoint.cpy();
21 move = new Vector2(0, 0);
22 width = 4;
23 height = 30;
24 texWidth = 8;
25 inv = new int[9];
26 }
28 public Rectangle getRect() {
29 return new Rectangle(pos.x + 2, pos.y, width, height);
30 }
32 }