Determines a circular motion.

Constructor

new(Options:TweenOptions, ?manager:FlxTweenManager)

Variables

@:value(0)read onlyangle:Float = 0

The current position on the circle.

read onlycircumference:Float

The circumference of the current circle motion.

Methods

@:value({ UseDuration : true })setMotion(CenterX:Float, CenterY:Float, Radius:Float, Angle:Float, Clockwise:Bool, DurationOrSpeed:Float, UseDuration:Bool = true):CircularMotion

Starts moving along a circle.

Parameters:

CenterX

X position of the circle's center.

CenterY

Y position of the circle's center.

Radius

Radius of the circle.

Angle

Starting position on the circle.

Clockwise

If the motion is clockwise.

DurationOrSpeed

Duration of the movement.

UseDuration

Duration of the movement.

Inherited Variables

Defined by Motion

@:value(0)x:Float = 0

Current x position of the Tween.

@:value(0)y:Float = 0

Current y position of the Tween.

Defined by FlxTween

@:value(false)active:Bool = false

read onlybackward:Bool

@:value(0)duration:Float = 0

@:value(0)read onlyexecutions:Int = 0

How many times this tween has been executed / has finished so far - useful to stop the LOOPING and PINGPONG types after a certain amount of time

read onlyfinished:Bool

@:value(0)loopDelay:Float = 0

Seconds to wait between loops of this tween, 0 by default

manager:FlxTweenManager

The manager to which this tween belongs

Available since

4.2.0

.

percent:Float

Value between 0 and 1 that indicates how far along this tween is in its completion. A value of 0.33 means that the tween is 33% complete.

@:value(0)read onlyscale:Float = 0

@:value(0)startDelay:Float = 0

Seconds to wait until starting this tween, 0 by default

Inherited Methods

Defined by Motion

Defined by FlxTween

cancel():Void

Immediately stops the Tween and removes it from its manager without calling the onComplete callback.

Yields control to the next chained Tween if one exists.

cancelChain():Void

Immediately stops the Tween and removes it from its manager without calling the onComplete callback or yielding control to the next chained Tween if one exists.

If control has already been passed on, forwards the cancellation request along the chain to the currently active Tween.

Available since

4.3.0

.

start():FlxTween

Starts the Tween, or restarts it if it's currently running.

then(tween:FlxTween):FlxTween

Specify a tween to be executed when this one has finished (useful for creating "tween chains").

wait(delay:Float):FlxTween

How many seconds to delay the execution of the next tween in a tween chain.