Contents

strength(to:duration:)

Creates an action that animates a change of a physics field’s strength.

Declaration

class func strength(to strength: Float, duration: TimeInterval) -> SKAction

Parameters

  • strength:

    The new strength for the field.

  • duration:

    The duration of the animation.

Return Value

A new action object.

Discussion

When the action executes, the field node’s strength property animates from its current value to its new value.

This action is not reversible; the reverse of this action has the same duration but does not do anything.

See Also

Animating Properties of a Node’s Physics Body