X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=core%2Fsrc%2Fru%2Fdeadsoftware%2Fcavecraft%2Fgame%2FGameInput.java;h=0f6c399c2ff60668c412fb0bdd1062964537b1e4;hb=0b8922bfbb2bbec067b532ecb7912f6afe02c4ef;hp=7a66d9949b223771e0fb321f87c220fe981dafe8;hpb=7f1f702250f9cd05c1d7f5492e09ba16a56270ae;p=cavedroid.git diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameInput.java b/core/src/ru/deadsoftware/cavecraft/game/GameInput.java index 7a66d99..0f6c399 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/GameInput.java +++ b/core/src/ru/deadsoftware/cavecraft/game/GameInput.java @@ -51,6 +51,7 @@ public class GameInput { gameProc.cursorY++; break; } + gameProc.blockDmg = 0; } } @@ -144,7 +145,7 @@ public class GameInput { int iy = (int) (screenY - (gameProc.renderer.camera.viewportHeight / 2 - Assets.creativeInv.getRegionHeight() / 2 + 18)) / 18; int item = gameProc.creativeScroll*8+(ix + iy * 8); if (ix>=8 || ix<0 || iy<0 || iy>=5) item=-1; - if (item >= 0 && item < Items.BLOCKS.size) { + if (item >= 0 && item < Items.ITEMS.size()) { for (int i = 8; i > 0; i--) { gameProc.player.inventory[i] = gameProc.player.inventory[i - 1]; } @@ -157,15 +158,10 @@ public class GameInput { screenX 0) { - gameProc.world.placeToForeground(gameProc.cursorX, gameProc.cursorY, 0); - } else if (gameProc.world.getBackMap(gameProc.cursorX, gameProc.cursorY) > 0) { - gameProc.world.placeToBackground(gameProc.cursorX, gameProc.cursorY, 0); - } - + gameProc.blockDmg = 0; } } gameProc.isTouchDown = false;