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) -> SKActionParameters
- 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
applyForce(_:duration:)applyTorque(_:duration:)applyForce(_:at:duration:)applyImpulse(_:duration:)applyAngularImpulse(_:duration:)applyImpulse(_:at:duration:)applyImpulse(_:duration:)changeCharge(to:duration:)changeCharge(by:duration:)changeMass(to:duration:)changeMass(by:duration:)strength(by:duration:)falloff(to:duration:)falloff(by:duration:)