DEADSOFTWARE

Fix codestyle
[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 import javax.annotation.CheckForNull;
7 public class Item {
9 private final String name;
10 private final String type;
11 private final Sprite tex;
13 public Item(String name, String type, @CheckForNull Sprite tex) {
14 this.name = name;
15 this.type = type;
16 this.tex = tex;
17 if (this.tex != null) {
18 this.tex.flip(false, true);
19 }
20 }
22 public Sprite getTex() {
23 return tex;
24 }
26 public String getType() {
27 return type;
28 }
30 public boolean isBlock() {
31 return type.equals("block");
32 }
34 public String getName() {
35 return name;
36 }
38 }