DEADSOFTWARE

Fix build
[cavedroid.git] / core / src / ru / deadsoftware / cavedroid / game / mobs / FallingGravel.java
1 package ru.deadsoftware.cavedroid.game.mobs;
3 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
4 import com.badlogic.gdx.math.Vector2;
5 import ru.deadsoftware.cavedroid.game.GameItems;
6 import ru.deadsoftware.cavedroid.misc.Assets;
8 /**
9 * Falling gravel is actually a mob, that spawns in place of gravel when there is no block under it,
10 * falls down to the next block and becomes a block of gravel again.
11 */
12 public class FallingGravel extends Mob {
14 /**
15 * Creates a FallingGravel mob at coordinates
16 * @param x X in pixels
17 * @param y Y in pixels
18 */
19 public FallingGravel(float x, float y) {
20 super(x, y, 16, 16, 0);
21 mov = new Vector2(0, 1);
22 }
24 @Override
25 public void ai() {
26 }
28 @Override
29 public void changeDir() {
30 }
32 @Override
33 public void draw(SpriteBatch spriteBatch, float x, float y) {
34 spriteBatch.draw(Assets.fallingGravelSprite, x, y);
35 }
37 @Override
38 public int getType() {
39 return 11;
40 }
42 }