diff --git a/core/src/ru/deadsoftware/cavedroid/game/mobs/Player.java b/core/src/ru/deadsoftware/cavedroid/game/mobs/Player.java
index ebdd9c0dbed6281204809267f6ed0997f270925b..70013367928b170cd8296542983c7780f2879b84 100644 (file)
public final int[] inventory;
public int slot;
public final int[] inventory;
public int slot;
- public final int gameMode;
+ public int gameMode;
public boolean swim;
public float headRotation = 0f;
public Player() {
super(0, 0, 4, 30, randomDir(), Type.MOB, MAX_HEALTH);
public boolean swim;
public float headRotation = 0f;
public Player() {
super(0, 0, 4, 30, randomDir(), Type.MOB, MAX_HEALTH);
- this.gameMode = 1;
inventory = new int[9];
swim = false;
}
inventory = new int[9];
swim = false;
}
}
}
}
}
+ public void setCurrentInventorySlotItem(int itemId) {
+ inventory[slot] = itemId;
+ }
+
@Override
public float getSpeed() {
return SPEED;
@Override
public float getSpeed() {
return SPEED;
if (hitAnim < 30f || hitAnim > 90f) {
if (hitting) {
if (hitAnim < 30f || hitAnim > 90f) {
if (hitting) {
+ hitAnim = MathUtils.clamp(hitAnim, 30f, 90f);
hitAnimDelta = -hitAnimDelta;
} else {
hitAnimDelta = ANIMATION_SPEED;
hitAnimDelta = -hitAnimDelta;
} else {
hitAnimDelta = ANIMATION_SPEED;