Programming the first five levels

We are going to start with programming the first five levels; we are going to do touch controls, physics, and collisions, so let's get to it.

Creating Level 1

This is the first level, so we are going to make it easy but still interesting.

  1. Double-click your player actor in the Inspector (to edit the main prototype or the original actor). Under the Physics roll-out, change the Restitution to 0.5, then drag in two Collide behaviors. Change the actors to Platform and Flinger.

    Tip

    Restitution: The return to an original physical condition, especially after elastic deformation. In other words, bounciness.

  2. Next add a rule, change it to Actor receives event | overlaps or collides | with actor of type | Basket, add a Change Scene behavior, and set it to Next Scene. We will add more behaviors as we go on, but for now that's all we need.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.72.15