DEADSOFTWARE

Code improvements
[cavedroid.git] / core / src / ru / deadsoftware / cavecraft / game / mobs / FallingSand.java
index b9108845122a13791d098539cf1d1b7f6dfe52ea..aa12a87561e2a08a25ab5ae184e069111213c97c 100644 (file)
@@ -1,21 +1,15 @@
 package ru.deadsoftware.cavecraft.game.mobs;
 
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 package ru.deadsoftware.cavecraft.game.mobs;
 
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
-import com.badlogic.gdx.math.Rectangle;
 import com.badlogic.gdx.math.Vector2;
 import ru.deadsoftware.cavecraft.game.GameItems;
 import ru.deadsoftware.cavecraft.misc.Assets;
 
 public class FallingSand extends Mob {
 
 import com.badlogic.gdx.math.Vector2;
 import ru.deadsoftware.cavecraft.game.GameItems;
 import ru.deadsoftware.cavecraft.misc.Assets;
 
 public class FallingSand extends Mob {
 
-    public FallingSand(int x, int y) {
-        dir = 0;
-        pos = new Vector2(x, y);
-        move = new Vector2(0, 1);
-        width = 16;
-        height = 16;
-        canJump = false;
-        dead = false;
+    public FallingSand(float x, float y) {
+        super(x, y, 16, 16, 0);
+        mov = new Vector2(0, 1);
     }
 
     @Override
     }
 
     @Override
@@ -31,11 +25,6 @@ public class FallingSand extends Mob {
         spriteBatch.draw(Assets.blockTex[GameItems.getBlock(10).getTex()], x, y);
     }
 
         spriteBatch.draw(Assets.blockTex[GameItems.getBlock(10).getTex()], x, y);
     }
 
-    @Override
-    public Rectangle getRect() {
-        return new Rectangle(pos.x, pos.y, width, height);
-    }
-
     @Override
     public int getType() {
         return 10;
     @Override
     public int getType() {
         return 10;