FruitFactory

enum FruitFactory

Contains factory metod for adding fruit to trees of different levels

  • Adds a fruit to a tree of the given level

    Declaration

    Swift

    static func addFruit(to tree: SKNode, withLevel level: Int) -> SKNode

    Parameters

    tree

    the tree to add the fruit to

    level

    level of the tree

    Return Value

    a tree with a fruit

  • Creates an explosion effect

    Declaration

    Swift

    static func createFruitExplosionEffect() -> SKNode?