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
.GameProc
;
7 import ru
.deadsoftware
.cavecraft
.game
.Items
;
8 import ru
.deadsoftware
.cavecraft
.misc
.Assets
;
10 public class FallingSand
extends Mob
{
12 public FallingSand(int x
, int y
) {
14 position
= new Vector2(x
, y
);
15 moveX
= new Vector2(0, 0);
16 moveY
= new Vector2(0, 1);
28 public void changeDir() {
32 public void draw(SpriteBatch spriteBatch
, float x
, float y
) {
33 spriteBatch
.draw(Assets
.blockTextures
[Items
.BLOCKS
.get("sand").getTexture()],x
, y
);
37 public Rectangle
getRect() {
38 return new Rectangle(position
.x
, position
.y
, width
, height
);
42 public int getType() {