Group App Instructions: Add floor and ceiling

  1. In game.lua, create theFloor and theCeiling using the image “floor.png”
    1. For Corona SDK, the grid looks like this: (0,0) is at the top left corner, increasing x goes rightwards and increasing y goes downward. The x positions for both variables should be at 0. What should the y variables be? Use display.contentHeight * a number
    2. Add a physics body that is static
    3. Add them to the screen group.
  2. In the functions scene:show and scene:hide, add and remove collision event listeners that use the function onCollision as listeners.
  3. Check your app. You should not be able to extent beyond the top and bottom of the app screen.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s