private void translateRelative(SpriterAbstractObject @object, SpriterAbstractObject parent) { @object.setAngle(@object.getAngle() * this.flippedX * this.flippedY + parent.getAngle() ); @object.setScaleX(@object.getScaleX() * parent.getScaleX()); @object.setScaleY(@object.getScaleY() * parent.getScaleY()); SpriterCalculator.translateRelative(parent, @object); }
public virtual void updateAbstractObject(SpriterAbstractObject @object) { if (@object.hasParent()) { SpriterAbstractObject obj = (@object is SpriterBone ) ? (SpriterAbstractObject)this.lastFrame.getBones()[@object.getId()] : this.lastFrame.getObjects()[@object .getId()]; SpriterCalculator.translateRelative(this.tempBones[@object .getParentId()], obj.getX(), obj.getY(), @object); } }
private void translateRoot() { this.rootParent.copyValuesTo(tempParent); this.tempParent.setAngle(this.tempParent.getAngle() * this.flippedX * this.flippedY + this .rootParent.getParent().getAngle()); this.tempParent.setScaleX(this.tempParent.getScaleX() * this.rootParent.getParent ().getScaleX()); this.tempParent.setScaleY(this.tempParent.getScaleY() * this.rootParent.getParent ().getScaleY()); SpriterCalculator.translateRelative(this.rootParent.getParent (), this.tempParent); }