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 FallingSand
extends Mob
{
11 public FallingSand(int x
, int y
) {
13 position
= new Vector2(x
, y
);
14 moveX
= new Vector2(0, 0);
15 moveY
= new Vector2(0, 1);
27 public void changeDir() {
31 public void draw(SpriteBatch spriteBatch
, float x
, float y
) {
32 spriteBatch
.draw(Assets
.blockTextures
[Items
.BLOCKS
.get("sand").getTexture()], x
, y
);
36 public Rectangle
getRect() {
37 return new Rectangle(position
.x
, position
.y
, width
, height
);
41 public int getType() {