Game Development Reference
In-Depth Information
You can create your own custom transitions using the SKTransition 's init() meth-
od, but it is more common to use one of the 13 built-in class-level SKTransition
methods. Table 8-1 defines each of these methods.
Table 8-1 . SKTransition's Class-Level Creation Methods
Template Name
Use
Class-level method that creates a cross-fade
transition
crossFadeWithDuration(_:)
Class-level method that creates a transition
where the new scene appears like closing hori-
zontal doors
doorsCloseHorizontalWithDuration(_:)
Class-level method that creates a transition
where the new scene appears like closing vertical
doors
doorsCloseVerticalWithDuration(_:)
Class-level method that creates a transition
where the new scene appears like opening hori-
zontal doors
doorsOpenHorizontalWithDuration(_:)
Class-level method that creates a transition
where the new scene appears like opening vertic-
al doors
doorsOpenVerticalWithDuration(_:)
Class-level method that creates a transition
where the previous scene disappears like a pair
of opening doors and the new scene starts in the
background and moves closer as the doors open
doorwayWithDuration(_:)
Class-level method that creates a transition that
first fades to a constant color and then fades to a
new scene
fadeWithColor(_:duration:)
Class-level method that creates a transition that
first fades to black and then fades to a new scene
fadeWithDuration(_:)
Class-level method that creates a transition
where the two scenes are flipped across a hori-
zontal line running through the center of the
view
flipHorizontalWithDuration(_:)
Class-level method that creates a transition
where the two scenes are flipped across a vertic-
al line running through the center of the view
flipVerticalWithDuration(_:)
Search WWH ::




Custom Search