DEADSOFTWARE

Rename position -> pos
[cavedroid.git] / core / src / ru / deadsoftware / cavecraft / game / mobs / FallingGravel.java
index 0cfa261380fd6b41f0413e1691f615bea2b4ced0..cc3c389840854a30da9091ab1803524daf3188d9 100644 (file)
@@ -3,16 +3,15 @@ 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.Items;
+import ru.deadsoftware.cavecraft.game.GameItems;
 import ru.deadsoftware.cavecraft.misc.Assets;
 
-public class FallingGravel extends Mob{
+public class FallingGravel extends Mob {
 
     public FallingGravel(int x, int y) {
         dir = 0;
-        position = new Vector2(x, y);
-        moveX = new Vector2(0, 0);
-        moveY = new Vector2(0, 1);
+        pos = new Vector2(x, y);
+        move = new Vector2(0, 1);
         width = 16;
         height = 16;
         canJump = false;
@@ -29,12 +28,12 @@ public class FallingGravel extends Mob{
 
     @Override
     public void draw(SpriteBatch spriteBatch, float x, float y) {
-        spriteBatch.draw(Assets.blockTextures[Items.BLOCKS.get("gravel").getTexture()],x, y);
+        spriteBatch.draw(Assets.blockTex[GameItems.getBlock(11).getTex()], x, y);
     }
 
     @Override
     public Rectangle getRect() {
-        return new Rectangle(position.x, position.y, width, height);
+        return new Rectangle(pos.x, pos.y, width, height);
     }
 
     @Override