Exemplo n.º 1
0
 @Override
 public void loadTo(SpriteEntity sprite) {
   super.loadTo(sprite);
   sprite.setPosition(x, y);
   sprite.setSize(width, height);
   sprite.setOrigin(originX, originY);
   sprite.setRotation(rotation);
   sprite.setScale(scaleX, scaleY);
   sprite.setColor(tint);
   sprite.setFlip(flipX, flipY);
 }
Exemplo n.º 2
0
  @Override
  public void saveFrom(SpriteEntity sprite, VisAssetDescriptor assetDescriptor) {
    super.saveFrom(sprite, assetDescriptor);
    x = sprite.getX();
    y = sprite.getY();

    width = sprite.getWidth();
    height = sprite.getHeight();

    originX = sprite.getOriginX();
    originY = sprite.getOriginY();

    rotation = sprite.getRotation();

    scaleX = sprite.getScaleX();
    scaleY = sprite.getScaleY();

    tint = sprite.getColor().cpy();

    flipX = sprite.isFlipX();
    flipY = sprite.isFlipY();
  }