Fixed some Android bugs
This commit is contained in:
@@ -21,7 +21,8 @@ public class Vars{
|
|||||||
//not marked as final, because of warnings
|
//not marked as final, because of warnings
|
||||||
public static boolean debug = false;
|
public static boolean debug = false;
|
||||||
|
|
||||||
public static final int multiplier = android ? 2 : 1;
|
//turret and enemy shoot speed inverse multiplier
|
||||||
|
public static final int multiplier = android ? 3 : 1;
|
||||||
|
|
||||||
public static final int tilesize = 8;
|
public static final int tilesize = 8;
|
||||||
|
|
||||||
|
|||||||
@@ -155,7 +155,9 @@ public class World{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tile(x, y).block() == Blocks.air;
|
Tile tile = tile(x, y);
|
||||||
|
|
||||||
|
return tile != null && tile.block() == Blocks.air;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean cursorNear(){
|
public static boolean cursorNear(){
|
||||||
|
|||||||
@@ -119,6 +119,9 @@ public class AndroidInput extends InputAdapter{
|
|||||||
lmousex = Gdx.input.getX(0);
|
lmousex = Gdx.input.getX(0);
|
||||||
lmousey = Gdx.input.getY(0);
|
lmousey = Gdx.input.getY(0);
|
||||||
player.breaktime = 0;
|
player.breaktime = 0;
|
||||||
|
|
||||||
|
mousex = Mathf.clamp(mousex, 0, Gdx.graphics.getWidth());
|
||||||
|
mousey = Mathf.clamp(mousey, 0, Gdx.graphics.getHeight());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user