X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=core%2Fsrc%2Fru%2Fdeadsoftware%2Fcavecraft%2Fgame%2FGameProc.java;h=2cdc302291cac2ec1c3faf961c5a8285cd261b13;hb=e0aa1520178df544807f3e803b4b6169346b07fb;hp=6a2bf046b8c52061885a680e7454d42f1cbd6418;hpb=fe86b2fc3788c58fb134415780b312b4c7ef5c97;p=cavedroid.git diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameProc.java b/core/src/ru/deadsoftware/cavecraft/game/GameProc.java index 6a2bf04..2cdc302 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/GameProc.java +++ b/core/src/ru/deadsoftware/cavecraft/game/GameProc.java @@ -2,7 +2,6 @@ package ru.deadsoftware.cavecraft.game; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input; -import com.badlogic.gdx.math.RandomXS128; import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.TimeUtils; import ru.deadsoftware.cavecraft.*; @@ -37,8 +36,8 @@ public class GameProc { physics = new GamePhysics(this); player = new Player(world.getSpawnPoint()); mobs = new Array(); - for (int i=0; i<1024/64; i++) { - mobs.add(new Pig(i*16*64, 0, world)); + for (int i=0; i= world.getWidth()) cursorX = world.getWidth()-1; if (cursorY < 0) cursorY = 0; if (cursorY >= world.getHeight()) cursorY = world.getHeight()-1; - if (cursorX<(player.position.x+player.texWidth/2)/16) - player.dir=0; - if (cursorX>(player.position.x+player.texWidth/2)/16) - player.dir=1; + if (ctrlMode==1) { + if (cursorX*16+8player.position.x+player.texWidth/2) + player.dir=1; + } } public void update(float delta) {