4fa47369fd151f2760ea314e58e9eadb2009ec43
1 package ru
.deadsoftware
.cavecraft
.game
.objects
;
3 import com
.badlogic
.gdx
.graphics
.g2d
.TextureRegion
;
4 import com
.badlogic
.gdx
.math
.Rectangle
;
11 public boolean collision
, background
, transparent
;
13 public Block(int texture
) {
14 this(0,0,16,16,texture
, true, false, false);
17 public Block(int texture
, boolean collision
, boolean background
, boolean transparent
) {
18 this(0,0,16,16,texture
, collision
, background
, transparent
);
21 public Block(int x
, int y
, int w
, int h
, int texture
, boolean collision
, boolean background
, boolean transparent
) {
26 this.texture
= texture
;
27 this.collision
= collision
;
28 this.background
= background
;
29 this.transparent
= transparent
;
32 public int getTexture() {
36 public Rectangle
getRect(int x
, int y
) {
39 return new Rectangle(x
+this.x
, y
+this.y
, w
, h
);