DEADSOFTWARE

Code improvements
[cavedroid.git] / core / src / ru / deadsoftware / cavecraft / game / objects / Block.java
index 8d27235a4fc941f87309855bf6c85e6e09538ed9..58714852ea514847d09c29bc68a7e913b2f99b55 100644 (file)
@@ -8,7 +8,8 @@ public class Block {
     private int tex;
     private int hp, drop;
 
     private int tex;
     private int hp, drop;
 
-    public boolean coll, bg, tp, rb;
+    //coll - collision, bg - background, tp - transparent, rb - requires block under it
+    private boolean coll, bg, tp, rb;
 
     public Block(int tex, int hp, int drop) {
         this(0, 0, 16, 16, tex, hp, drop, true, false, false, false);
 
     public Block(int tex, int hp, int drop) {
         this(0, 0, 16, 16, tex, hp, drop, true, false, false, false);
@@ -40,6 +41,22 @@ public class Block {
         this.rb = rb;
     }
 
         this.rb = rb;
     }
 
+    public boolean hasCollision() {
+        return coll;
+    }
+
+    public boolean isBackground() {
+        return bg;
+    }
+
+    public boolean isTransparent() {
+        return tp;
+    }
+
+    public boolean requiresBlock() {
+        return rb;
+    }
+
     public int getTex() {
         return tex;
     }
     public int getTex() {
         return tex;
     }