X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=core%2Fsrc%2Fru%2Fdeadsoftware%2Fcavecraft%2Fgame%2Fobjects%2FBlock.java;h=4fa47369fd151f2760ea314e58e9eadb2009ec43;hb=4617ae53584520a741f45770e17a2a253717f83a;hp=a1696f64b340a7c3ed979cf3c3e5b359362dfb0e;hpb=c217099d21a0703347236f2d83e4d20c266f9be1;p=cavedroid.git diff --git a/core/src/ru/deadsoftware/cavecraft/game/objects/Block.java b/core/src/ru/deadsoftware/cavecraft/game/objects/Block.java index a1696f6..4fa4736 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/objects/Block.java +++ b/core/src/ru/deadsoftware/cavecraft/game/objects/Block.java @@ -6,25 +6,30 @@ import com.badlogic.gdx.math.Rectangle; public class Block { private int x,y,w,h; - private TextureRegion texture; + private int texture; - public boolean collision, foreground; + public boolean collision, background, transparent; - public Block(int x, int y, int w, int h, TextureRegion texture) { - this(x,y,w,h,texture, true, false); + public Block(int texture) { + this(0,0,16,16,texture, true, false, false); } - public Block(int x, int y, int w, int h, TextureRegion texture, boolean collision, boolean foreground) { + public Block(int texture, boolean collision, boolean background, boolean transparent) { + this(0,0,16,16,texture, collision, background, transparent); + } + + public Block(int x, int y, int w, int h, int texture, boolean collision, boolean background, boolean transparent) { this.x = x; this.y = y; this.w = w; this.h = h; this.texture = texture; this.collision = collision; - this.foreground = foreground; + this.background = background; + this.transparent = transparent; } - public TextureRegion getTexture() { + public int getTexture() { return texture; }