TreeFactory
enum TreeFactory
Contains factory metods for creating trees of different levels
-
Creates a tree corresponding to the level given as a parameter
Declaration
Swift
static func createTree(level: Int) -> SKNodeParameters
levelrequested level of the tree
Return Value
a tree as a SKNode
-
Creates a SKAction sequence of rotate SKActions
Declaration
Swift
static func createRotationAction(angle: CGFloat, duration: Double, loop: Bool) -> SKActionParameters
anglethe angle of each individual rotation action
durationthe duration of one iteration of the action sequence
loopif the action should loop
Return Value
SKAction sequence of rotation actions
-
Creates a SKAction sequence of scale SKActions
Declaration
Swift
static func createScaleAction(scaleAmount: CGFloat, duration: Double, loop: Bool) -> SKActionParameters
scaleAmountthe amount the action should scale by
durationthe duration of one iteration of the action sequence
loopif the action should loop
Return Value
SKAction sequence of scale actions
View on GitHub
TreeFactory Enumeration Reference