DEADSOFTWARE

Inspect code
[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 final String name;
8 private final String type;
9 private final Sprite tex;
11 public Item(String name, String type, Sprite tex) {
12 this.name = name;
13 this.type = type;
14 this.tex = tex;
15 if (this.tex != null) this.tex.flip(false, true);
16 }
18 public Sprite getTex() {
19 return tex;
20 }
22 public String getType() {
23 return type;
24 }
26 public boolean isBlock() {
27 return type.equals("block");
28 }
30 public String getName() {
31 return name;
32 }
34 }