DEADSOFTWARE

Make all Assets final
[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.misc.Assets;
7 /**
8 * Falling gravel is actually a mob, that spawns in place of gravel when there is no block under it,
9 * falls down to the next block and becomes a block of gravel again.
10 */
11 public class FallingGravel extends Mob {
13 /**
14 * Creates a FallingGravel mob at coordinates
15 * @param x X in pixels
16 * @param y Y in pixels
17 */
18 public FallingGravel(float x, float y) {
19 super(x, y, 16, 16, 0);
20 mov = new Vector2(0, 1);
21 }
23 @Override
24 public void ai() {
25 }
27 @Override
28 public void changeDir() {
29 }
31 @Override
32 public void draw(SpriteBatch spriteBatch, float x, float y) {
33 spriteBatch.draw(Assets.gravelSprite, x, y);
34 }
36 @Override
37 public int getType() {
38 return 11;
39 }
41 }