Various Ways to Add and Animate Lights in the Pinball Games iOS and tvOS Starter Kit

Various Ways to Add and Animate Lights to the Table Scene

(Lights can be anything really)

Open the video fullscreen

 

In this video we will discuss….

  • Exporting animation sequences and saving them to .atlas folders, then importing them into the kit. More discussing on importing assets here.
  • Creating and animating a looping animation in the Scene just using the timeline (without using a property list, or Custom Class)
  • Creating a sprite with a Custom Class of “Light”, and giving it a physics body.
  • Using properties to make a light play an animation when it contacts the ball.
  • Using properties to setup a non-collision based animation for the light. For example, the light could play an animation when the ball hits another object, the plunger is released, a goal is accomplished, etc. Lights can store up to 8 different animation sequences.
  • Using a Goal, triggered by the plunger, to play the animation stored in one or more lights.

Note: A sprite with a Custom Class of “Light” will never collide with the ball (they won’t bump off each other). The kit listens for a contact between their two physics bodies to do something like play a sound, animation, etc., but those bodies can occupy the same space. So the ball can roll over or under anything of the Light class, depending on it’s zPosition (depth). The sprite doesn’t necessarily have to look like a light. It could be a metal gate the ball rolls through, a bridge it rolls under, etc.