本文整理汇总了C#中com.setY方法的典型用法代码示例。如果您正苦于以下问题:C# com.setY方法的具体用法?C# com.setY怎么用?C# com.setY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com
的用法示例。
在下文中一共展示了com.setY方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: copyValuesTo
/// <summary>Sets the values of this instance to the given one.</summary>
/// <remarks>Sets the values of this instance to the given one.</remarks>
/// <param name="object">which has to be manipulated.</param>
public virtual void copyValuesTo(com.brashmonkey.spriter.objects.SpriterAbstractObject
@object)
{
@object.setAngle(angle);
@object.setScaleX(scaleX);
@object.setScaleY(scaleY);
@object.setX(x);
@object.setY(y);
@object.setId(id);
@object.setParentId(parentId);
@object.setParent(parent);
@object.setTimeline(timeline);
@object.setSpin(spin);
@object.setName(name);
}
示例2: interpolateAbstractObject
private void interpolateAbstractObject(com.brashmonkey.spriter.objects.SpriterAbstractObject
target, com.brashmonkey.spriter.objects.SpriterAbstractObject obj1, com.brashmonkey.spriter.objects.SpriterAbstractObject
obj2, float startTime, float endTime, float frame)
{
if (obj2 == null)
{
return;
}
target.setX(this.interpolate(obj1.getX(), obj2.getX(), startTime, endTime, frame)
);
target.setY(this.interpolate(obj1.getY(), obj2.getY(), startTime, endTime, frame)
);
target.setScaleX(this.interpolate(obj1.getScaleX(), obj2.getScaleX(), startTime,
endTime, frame));
target.setScaleY(this.interpolate(obj1.getScaleY(), obj2.getScaleY(), startTime,
endTime, frame));
target.setAngle(this.interpolateAngle(obj1.getAngle(), obj2.getAngle(), startTime
, endTime, frame));
}
示例3: modObject
private void modObject(com.brashmonkey.spriter.objects.SpriterAbstractObject @object
)
{
@object.setAngle(@object.getAngle() + this.angle);
@object.setScaleX(@object.getScaleX() * this.scaleX);
@object.setScaleY(@object.getScaleY() * this.scaleY);
@object.setX(@object.getX() + this.x);
@object.setY(@object.getY() + this.y);
}
示例4: translateRelative
/// <summary>Rotates the given point around the given parent.</summary>
/// <remarks>Rotates the given point around the given parent.</remarks>
/// <param name="parent"></param>
/// <param name="x"></param>
/// <param name="y"></param>
/// <param name="target">save new position in</param>
public static void translateRelative(com.brashmonkey.spriter.objects.SpriterAbstractObject
parent, float x, float y, com.brashmonkey.spriter.objects.SpriterAbstractObject
target)
{
float px = x * (parent.getScaleX());
float py = y * (parent.getScaleY());
float s = (float)System.Math.Sin(DegreeToRadian(parent.getAngle()));
float c = (float)System.Math.Cos(DegreeToRadian(parent.getAngle()));
float xnew = (px * c) - (py * s);
float ynew = (px * s) + (py * c);
xnew += parent.getX();
ynew += parent.getY();
target.setX(xnew);
target.setY(ynew);
}
示例5: reTranslateRelative
public static void reTranslateRelative(com.brashmonkey.spriter.objects.SpriterAbstractObject
parent, float x, float y, com.brashmonkey.spriter.objects.SpriterAbstractObject
target)
{
target.setAngle(target.getAngle() - parent.getAngle());
target.setScaleX(target.getScaleX() / parent.getScaleX());
target.setScaleY(target.getScaleY() / parent.getScaleY());
float xx = x - parent.getX();
float yy = y - parent.getY();
double angle = DegreeToRadian(parent.getAngle());
float cos = (float)System.Math.Cos(angle);
float sin = (float)System.Math.Sin(angle);
float newX = yy * sin + xx * cos;
float newY = yy * cos - xx * sin;
target.setX(newX / parent.getScaleX());
target.setY(newY / parent.getScaleY());
}
示例6: updateTransformedTempObject
private void updateTransformedTempObject(com.brashmonkey.spriter.objects.SpriterAbstractObject
source, com.brashmonkey.spriter.objects.SpriterAbstractObject target)
{
source.copyValuesTo(target);
if (!target.hasParent())
{
target.setX(target.getX() + this.pivotX);
target.setY(target.getY() + this.pivotY);
}
this.translateRelative(target, (target.hasParent()) ? this.tempBones2[target.getParentId
()] : this.tempParent);
}