X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=core%2Fsrc%2Fru%2Fdeadsoftware%2Fcavedroid%2Fgame%2Fobjects%2FItem.java;h=9868a96b18d0d0dfe4a2c502cf29c50f7193f96a;hb=59d48c1b28c570755327a8fb0827fa57e7fd3914;hp=a619a1babfdcfd94e3c76a2fb86261d88f00055d;hpb=4eb1f6f24fb76c0336394b85393e801fd0b99da4;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 a619a1b..9868a96 100644 --- a/core/src/ru/deadsoftware/cavedroid/game/objects/Item.java +++ b/core/src/ru/deadsoftware/cavedroid/game/objects/Item.java @@ -2,16 +2,21 @@ package ru.deadsoftware.cavedroid.game.objects; import com.badlogic.gdx.graphics.g2d.Sprite; +import javax.annotation.CheckForNull; + public class Item { - private String name, type; - private Sprite tex; + private final String name; + private final String type; + 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() {