This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Air Hockey | |
-- Kyle Wood | |
supportedOrientations(LANDSCAPE_LEFT)--can only be used in landscape position | |
function setup() | |
displayMode(FULLSCREEN_NO_BUTTONS)--starts the game in full screen (for testing purposes) | |
game=0--initial setup variable to show homescreen | |
win=0--setting a nul value to bypass the variable test asking who wins | |
leftscore=0 rightscore=0--setting scores to 0 for start | |
w={}--setting a table for the wall bodies and goalpoast bodies | |
w[1]=physics.body(EDGE,vec2(0,0),vec2(0,HEIGHT))--w[1]-w[8] set the wall and goalpost physic bodies |