resize(toHeight:duration:)
Creates an action that changes the height of a sprite to a new absolute value.
Declaration
class func resize(toHeight height: CGFloat, duration: TimeInterval) -> SKActionParameters
- height:
The new height of the sprite.
- duration:
The duration of the animation.
Return Value
A new action object.
Discussion
This action can only be executed by an SKSpriteNode object. When the action executes, the sprite’s size property animates to its new value.
This action is not reversible; the reverse of this action has the same duration but does not change anything.
See Also
Animating a Node’s Texture
resize(byWidth:height:duration:)resize(toWidth:duration:)resize(toWidth:height:duration:)setTexture(_:)setTexture(_:resize:)animate(with:timePerFrame:)animate(with:timePerFrame:resize:restore:)setNormalTexture(_:)setNormalTexture(_:resize:)animate(withNormalTextures:timePerFrame:)animate(withNormalTextures:timePerFrame:resize:restore:)colorize(with:colorBlendFactor:duration:)colorize(withColorBlendFactor:duration:)