X-Git-Url: https://deadsoftware.ru/gitweb?p=cavedroid.git;a=blobdiff_plain;f=core%2Fsrc%2Fru%2Fdeadsoftware%2Fcavecraft%2Fgame%2Fmobs%2FFallingGravel.java;h=23515f40a4079f5d311e666ee3a549f96d6154b0;hp=0cfa261380fd6b41f0413e1691f615bea2b4ced0;hb=cef4b5a9985bcbdfea6dc652147ecde0721d7fdc;hpb=75e8bbe4c9dceaabd8bb7e7976ad9052cfb0a968 diff --git a/core/src/ru/deadsoftware/cavecraft/game/mobs/FallingGravel.java b/core/src/ru/deadsoftware/cavecraft/game/mobs/FallingGravel.java index 0cfa261..23515f4 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/mobs/FallingGravel.java +++ b/core/src/ru/deadsoftware/cavecraft/game/mobs/FallingGravel.java @@ -1,22 +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 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); - width = 16; - height = 16; - canJump = false; - dead = false; +public class FallingGravel extends Mob { + + public FallingGravel(float x, float y) { + super(x, y, 16, 16, 0); + mov = new Vector2(0, 1); } @Override @@ -29,12 +22,7 @@ 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); - } - - @Override - public Rectangle getRect() { - return new Rectangle(position.x, position.y, width, height); + spriteBatch.draw(Assets.blockTex[GameItems.getBlock(11).getTex()], x, y); } @Override