X-Git-Url: https://deadsoftware.ru/gitweb?p=cavedroid.git;a=blobdiff_plain;f=core%2Fsrc%2Fru%2Fdeadsoftware%2Fcavecraft%2Fgame%2Fobjects%2FBlock.java;h=dfd8351dffbd6dc694ee9be42f8263e2c1311d64;hp=5d2814e7f0e1c26603c763390989819237c26685;hb=bea2a3c5b967bcd90ccd83e08e833d58449e963a;hpb=0b8922bfbb2bbec067b532ecb7912f6afe02c4ef diff --git a/core/src/ru/deadsoftware/cavecraft/game/objects/Block.java b/core/src/ru/deadsoftware/cavecraft/game/objects/Block.java index 5d2814e..dfd8351 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/objects/Block.java +++ b/core/src/ru/deadsoftware/cavecraft/game/objects/Block.java @@ -4,18 +4,18 @@ import com.badlogic.gdx.math.Rectangle; public class Block { - private int x,y,w,h; + private int x, y, w, h; private int texture; private int hp, drop; public boolean collision, background, transparent; public Block(int texture, int hp, int drop) { - this(0,0,16,16,texture, hp, drop, true, false, false); + this(0, 0, 16, 16, texture, hp, drop, true, false, false); } public Block(int texture, int hp, int drop, boolean collision, boolean background, boolean transparent) { - this(0,0,16,16,texture, hp, drop, collision, background, transparent); + this(0, 0, 16, 16, texture, hp, drop, collision, background, transparent); } public Block(int x, int y, int w, int h, int texture, int hp, int drop, boolean collision, boolean background, boolean transparent) { @@ -44,13 +44,13 @@ public class Block { } public Rectangle getRect(int x, int y) { - x*=16; - y*=16; - return new Rectangle(x+this.x, y+this.y, w, h); + x *= 16; + y *= 16; + return new Rectangle(x + this.x, y + this.y, w, h); } public boolean toJump() { - return (y<8 && collision); + return (y < 8 && collision); } }