Gumball Machine Demo using the Story Tellers iOS Starter Kit 2
This video demonstrates some of the physics properties in the Story Tellers iOS Starter Kit 2 (built with Swift 2, iOS9 and SpriteKit).
This example shows how a quarter is lifted into the coin slot, at which point the zPosition property of the node (Element in terms of the kit) is adjusted using an Event Listener. The listener is checking for an intersection between the quarter and an invisible coin drop area. Then the example shows how using a rotation of two fingers on screen (code wise this is UIRotationGesture recognizer) makes a physics-based body turn, thus colliding with the quarter and other invisible physics bodies guide it down to the drop area. So this example combines a TouchEvents, TouchUpEvents, Events with particular physics contacts and an event listener, and it is included with the demo project of the Story Teller’s iOS Starter Kit 2.