Let's start off with introducing all the variables needed to run the game:
Create a brand new
main.lua
file and add it in thePanda Star Catcher
project folder.Let's hide the status bar from the devices and set all the variables needed in game:
display.setStatusBar( display.HiddenStatusBar ) -- Hides the status bar in iOS only -- Display groups local hudGroup = display.newGroup() -- Displays the HUD local gameGroup = display.newGroup() local levelGroup = display.newGroup() local stars = display.newGroup() -- Displays the stars -- Modules local physics = require ("physics") local mCeil = math.ceil local mAtan2 = math.atan2 local mPi = math.pi local mSqrt = math.sqrt -- Game Objects local background local ground local powerShot local arrow local panda local poof local starGone local scoreText local gameOverDisplay -- Variables local gameIsActive = false local waitingForNewRound local restartTimer local counter local timerInfo local numSeconds...