changeCharge(to:duration:)
Creates an action that changes the charge of a node’s physics body to a new value.
Declaration
class func changeCharge(to v: Float, duration: TimeInterval) -> SKActionParameters
- v:
The new charge of the physics body.
- duration:
The duration of the animation.
Return Value
A new action object.
Discussion
When the action executes, the physics body’s charge property animates from its current value to its new value.
This action is not reversible.
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(by:duration:)changeMass(to:duration:)changeMass(by:duration:)strength(to:duration:)strength(by:duration:)falloff(to:duration:)falloff(by:duration:)