DEADSOFTWARE

0cfa261380fd6b41f0413e1691f615bea2b4ced0
[cavedroid.git] / core / src / ru / deadsoftware / cavecraft / game / mobs / FallingGravel.java
1 package ru.deadsoftware.cavecraft.game.mobs;
3 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
4 import com.badlogic.gdx.math.Rectangle;
5 import com.badlogic.gdx.math.Vector2;
6 import ru.deadsoftware.cavecraft.game.Items;
7 import ru.deadsoftware.cavecraft.misc.Assets;
9 public class FallingGravel extends Mob{
11 public FallingGravel(int x, int y) {
12 dir = 0;
13 position = new Vector2(x, y);
14 moveX = new Vector2(0, 0);
15 moveY = new Vector2(0, 1);
16 width = 16;
17 height = 16;
18 canJump = false;
19 dead = false;
20 }
22 @Override
23 public void ai() {
24 }
26 @Override
27 public void changeDir() {
28 }
30 @Override
31 public void draw(SpriteBatch spriteBatch, float x, float y) {
32 spriteBatch.draw(Assets.blockTextures[Items.BLOCKS.get("gravel").getTexture()],x, y);
33 }
35 @Override
36 public Rectangle getRect() {
37 return new Rectangle(position.x, position.y, width, height);
38 }
40 @Override
41 public int getType() {
42 return 11;
43 }
45 }