示例#1
0
 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);
 }
示例#2
0
  @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;
  }
示例#3
0
 @Override
 public int hashCode() {
   return bufferedTexture.hashCode();
 }