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) -> SKNode
Parameters
level
requested 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) -> SKAction
Parameters
angle
the angle of each individual rotation action
duration
the duration of one iteration of the action sequence
loop
if 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) -> SKAction
Parameters
scaleAmount
the amount the action should scale by
duration
the duration of one iteration of the action sequence
loop
if the action should loop
Return Value
SKAction sequence of scale actions