X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=core%2Fsrc%2Fru%2Fdeadsoftware%2Fcavecraft%2Fgame%2Fmobs%2FFallingSand.java;h=aa12a87561e2a08a25ab5ae184e069111213c97c;hb=cef4b5a9985bcbdfea6dc652147ecde0721d7fdc;hp=a410eb3541a2cfc36d8108a3d6257d03865245c5;hpb=84b8cd80e39699174969bfed0734e78b8ec09615;p=cavedroid.git diff --git a/core/src/ru/deadsoftware/cavecraft/game/mobs/FallingSand.java b/core/src/ru/deadsoftware/cavecraft/game/mobs/FallingSand.java index a410eb3..aa12a87 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/mobs/FallingSand.java +++ b/core/src/ru/deadsoftware/cavecraft/game/mobs/FallingSand.java @@ -1,21 +1,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 FallingSand extends Mob { - public FallingSand(int x, int y) { - dir = 0; - position = 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 @@ -28,12 +22,7 @@ public class FallingSand extends Mob { @Override public void draw(SpriteBatch spriteBatch, float x, float y) { - spriteBatch.draw(Assets.blockTextures[Items.BLOCKS.get("sand").getTexture()], x, y); - } - - @Override - public Rectangle getRect() { - return new Rectangle(position.x, position.y, width, height); + spriteBatch.draw(Assets.blockTex[GameItems.getBlock(10).getTex()], x, y); } @Override