1 package ru
.deadsoftware
.cavecraft
.game
.objects
;
3 import com
.badlogic
.gdx
.graphics
.g2d
.TextureRegion
;
4 import com
.badlogic
.gdx
.math
.Rectangle
;
9 private TextureRegion texture
;
11 public boolean collision
, foreground
;
13 public Block(int x
, int y
, int w
, int h
, TextureRegion texture
) {
14 this(x
,y
,w
,h
,texture
, true, false);
17 public Block(int x
, int y
, int w
, int h
, TextureRegion texture
, boolean collision
, boolean foreground
) {
22 this.texture
= texture
;
23 this.collision
= collision
;
24 this.foreground
= foreground
;
27 public TextureRegion
getTexture() {
31 public Rectangle
getRect(int x
, int y
) {
34 return new Rectangle(x
+this.x
, y
+this.y
, w
, h
);