12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1250 Part IV ■ <strong>Reference</strong>SetCurveSets the curve type <strong>for</strong> the path animation.Path:SetCurve(“curveType“)Arguments:curveType—Thecursetype<strong>for</strong>thegivenpath(string)NONE - The control points are used literally.SMOOTH - The control points are used with a smoothing function that may givea more pleasing animation.ControlPointA ControlPoint is a special type <strong>of</strong> UIObject that represent a point in a PathAnimation. The <strong>of</strong>fset <strong>for</strong> each control point is from the origin <strong>of</strong> the animated Region.See Path <strong>for</strong> more details.ControlPoint has all the methods from ParentedObject, plus the following:GetOffsetReturns the <strong>of</strong>fset <strong>for</strong> the control point.x, y = ControlPoint:GetOffset()Returns:x—The x coordinate <strong>of</strong>fset <strong>for</strong> the control point (number)y—The y coordinate <strong>of</strong>fset <strong>for</strong> the control point (number)GetOrderReturns the order <strong>of</strong> the control point in a path animation.order = ControlPoint:GetOrder()When the parent path animation plays, the control points with a lower numberare traversed be<strong>for</strong>e those with a higher number. Control points must havedistinct order indices, <strong>and</strong> these will be assigned automatically as new pointsare created.Returns:order—Position at which the control point will be traversed relativeto others in the same path animation (between 0 <strong>and</strong> 100) (number)SetOffsetSets the <strong>of</strong>fset <strong>for</strong> the control point.ControlPoint:SetOffset(x, y)Arguments:x—The x coordinate <strong>of</strong>fset <strong>for</strong> the control point (number)y—The y coordinate <strong>of</strong>fset <strong>for</strong> the control point (number)SetOrderSets the order <strong>of</strong> the control point in a path animation.ControlPoint:SetOrder(order)When the parent path animation plays, the control points with a lower numberare traversed be<strong>for</strong>e those with a higher number. Control points must have

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!