In the following use case, I'm trying to animate the lineWidth
of an SKShapeNode
.
SKEase is part of the wonderful SpriteKitEasing github repo from Craig Grummitt.
One of its facilities is a Float changing ease action that appears to change the value of a float over time.
However I can't figure out how to use it. Xcode gives the following suggestions when typing it in:
let lineWeight = SKEase.createFloatTween(<start: CGFloat, end: CGFloat, time: TimeInterval, easingFunction: AHEasingFunction, setterBlock: ((SKNode, CGFloat) -> Void))
With other SKEase actions from this library, Xcode is very helpful with ease types, and helping to figure out what to enter.
With this one, I have no idea what options are available for AHEasingFunctions... which I can probably find.
But I have absolutely no idea what or how to use the final part, the setterBlock seemingly expecting a function taking a pair of parameters unrelated to the activity. XCode won't accept SKShapeNodes or SKSpriteNodes here, only an SKNode, but I can't get beyond that.
Here's how the docs for SKEase describe it: