DEADSOFTWARE

Move items to JSON
[cavedroid.git] / core / src / ru / deadsoftware / cavedroid / game / objects / Item.java
1 package ru.deadsoftware.cavedroid.game.objects;
3 import com.badlogic.gdx.graphics.g2d.Sprite;
5 public class Item {
7 private String name, type;
8 private Sprite tex;
10 public Item(String name, String type, Sprite tex) {
11 this.name = name;
12 this.type = type;
13 this.tex = tex;
14 if (this.tex != null) this.tex.flip(false, true);
15 }
17 public Sprite getTex() {
18 return tex;
19 }
21 public String getType() {
22 return type;
23 }
25 public boolean isBlock() {
26 return type.equals("block");
27 }
29 public String getName() {
30 return name;
31 }
33 }