DEADSOFTWARE

Add different blocks
[cavedroid.git] / core / src / ru / deadsoftware / cavecraft / game / objects / Block.java
1 package ru.deadsoftware.cavecraft.game.objects;
3 import com.badlogic.gdx.graphics.g2d.TextureRegion;
4 import com.badlogic.gdx.math.Rectangle;
6 public class Block {
8 private Rectangle rect;
9 private TextureRegion texture;
11 public Block(int x, int y, int w, int h, TextureRegion texture) {
12 rect = new Rectangle(x,y,w,h);
13 this.texture = texture;
14 }
16 public TextureRegion getTexture() {
17 return texture;
18 }
20 public Rectangle getRect() {
21 return rect;
22 }
24 public int getX() {
25 return (int)rect.x;
26 }
28 public int getY() {
29 return (int)rect.y;
30 }
32 public int getWidth() {
33 return (int)rect.width;
34 }
36 public int getHeight() {
37 return (int)rect.height;
38 }
39 }