Step 1: Adding Components to Screen

Goal:


The first step to any app is making sure all the elements you need are present on the screen.

We need a label to tell us our score, a canvas where our game takes place.

Sprites that move on the canvas, and Accelerometer Sensor to move the objects on the screen, and a notifier for when you lose.

Steps:

  1. From User Interface, place a label on the screen.
  2. From Drawing and Animation, place a canvas on the screen.
  3. From Drawing and Animation, place 2 Imagesprites into the canvas.
  4. From Sensors, place an AccelerometerSensor onto the screen.
  5. From User Interface, place a Notifier on the screen.

Code: