diff --git a/core/src/ru/deadsoftware/cavecraft/game/mobs/FallingSand.java b/core/src/ru/deadsoftware/cavecraft/game/mobs/FallingSand.java
index 37f8a59c366527c6946f5d2c3e9a96e26a1be29c..b9108845122a13791d098539cf1d1b7f6dfe52ea 100644 (file)
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector2;
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 FallingSand extends Mob {
public FallingSand(int x, int y) {
dir = 0;
import ru.deadsoftware.cavecraft.misc.Assets;
public class FallingSand extends Mob {
public FallingSand(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;
width = 16;
height = 16;
canJump = false;
@Override
public void draw(SpriteBatch spriteBatch, float x, float y) {
@Override
public void draw(SpriteBatch spriteBatch, float x, float y) {
- spriteBatch.draw(Assets.blockTextures[Items.BLOCKS.get("sand").getTexture()], x, y);
+ spriteBatch.draw(Assets.blockTex[GameItems.getBlock(10).getTex()], x, y);
}
@Override
public Rectangle getRect() {
}
@Override
public Rectangle getRect() {
- return new Rectangle(position.x, position.y, width, height);
+ return new Rectangle(pos.x, pos.y, width, height);
}
@Override
}
@Override