diff --git a/core/src/ru/deadsoftware/cavedroid/game/GameInput.java b/core/src/ru/deadsoftware/cavedroid/game/GameInput.java
index 594f8cc64d16df74b1c1dca1b7f032ad1a6b1be7..3f9b77322431e0275640edd3f12f6bf7d9b71626 100644 (file)
if (checkSwim()) {
mPlayer.swim = true;
} else if (mPlayer.canJump()) {
- mPlayer.getMove().add(0, -7);
+ mPlayer.getVelocity().add(0, -7);
} else if (!mPlayer.isFlyMode() && mPlayer.gameMode == 1) {
mPlayer.setFlyMode(true);
- mPlayer.getMove().y = 0;
+ mPlayer.getVelocity().y = 0;
} else if (mPlayer.isFlyMode()) {
- mPlayer.getMove().y = -GamePhysics.PL_SPEED;
+ mPlayer.getVelocity().y = -GamePhysics.PL_SPEED;
}
}
if (mControlMode == ControlMode.WALK || !mMainConfig.isTouch()) {
switch (keycode) {
case Input.Keys.A:
- mPlayer.getMove().x = -GamePhysics.PL_SPEED;
+ mPlayer.getVelocity().x = -GamePhysics.PL_SPEED;
mPlayer.setDir(Mob.Direction.LEFT);
if (mMainConfig.isTouch() && checkSwim()) {
mPlayer.swim = true;
}
break;
case Input.Keys.D:
- mPlayer.getMove().x = GamePhysics.PL_SPEED;
+ mPlayer.getVelocity().x = GamePhysics.PL_SPEED;
mPlayer.setDir(Mob.Direction.RIGHT);
if (mMainConfig.isTouch() && checkSwim()) {
mPlayer.swim = true;
break;
case Input.Keys.S:
case Input.Keys.CONTROL_LEFT:
- mPlayer.getMove().y = GamePhysics.PL_SPEED;
+ mPlayer.getVelocity().y = GamePhysics.PL_SPEED;
break;
}
} else {
switch (keycode) {
case Input.Keys.A:
case Input.Keys.D:
- mPlayer.getMove().x = 0;
+ mPlayer.getVelocity().x = 0;
if (mMainConfig.isTouch() && mPlayer.swim) {
mPlayer.swim = false;
}
case Input.Keys.SPACE:
case Input.Keys.CONTROL_LEFT:
if (mPlayer.isFlyMode()) {
- mPlayer.getMove().y = 0;
+ mPlayer.getVelocity().y = 0;
}
if (mPlayer.swim) {
mPlayer.swim = false;