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: https://coronafaqs.files.wordpress.com/2012/01/native_coordinate_system.jpg. (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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s