public void setBufferedTexture(BufferedTexture bufferedTexture) { this.bufferedTexture = bufferedTexture; setTextureId(bufferedTexture.textureId); setTextureBufferId(bufferedTexture.floatBufferId); SpriteTetxure spriteTetxure = bufferedTexture.getAnimation(State.Type.IDLE)[0]; setTextureBufferOffsetId(spriteTetxure.offsetId); dimension.set(spriteTetxure.width, spriteTetxure.height, 0); scaling.set(1, 1, 0); useSharedTextureCoordBuffer(true); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Sprite)) return false; Sprite sprite = (Sprite) o; if (!bufferedTexture.equals(sprite.bufferedTexture)) return false; return true; }
@Override public int hashCode() { return bufferedTexture.hashCode(); }