X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=core%2Fsrc%2Fru%2Fdeadsoftware%2Fcavedroid%2Fgame%2Fobjects%2FItem.java;h=8e664ace9bf0a134783d92e7bca5781eb91ba41d;hb=f4d52e3e4a3712050532786fca0aded5ff8b5a03;hp=0083001d05d844a3744146e3e0d0cd544d7c89c8;hpb=ef32f2e88b9c0daa411d0c304ce62b1235541fb1;p=cavedroid.git diff --git a/core/src/ru/deadsoftware/cavedroid/game/objects/Item.java b/core/src/ru/deadsoftware/cavedroid/game/objects/Item.java index 0083001..8e664ac 100644 --- a/core/src/ru/deadsoftware/cavedroid/game/objects/Item.java +++ b/core/src/ru/deadsoftware/cavedroid/game/objects/Item.java @@ -2,20 +2,26 @@ package ru.deadsoftware.cavedroid.game.objects; import com.badlogic.gdx.graphics.g2d.Sprite; +import javax.annotation.CheckForNull; + public class Item { private final String name; private final String type; + @CheckForNull private final Sprite tex; - public Item(String name, String type, Sprite tex) { + public Item(String name, String type, @CheckForNull Sprite tex) { this.name = name; this.type = type; this.tex = tex; - if (this.tex != null) this.tex.flip(false, true); + if (this.tex != null) { + this.tex.flip(false, true); + } } - public Sprite getTex() { + public Sprite getTexture() { + assert tex != null; return tex; }