It looks like you're new here. If you want to get involved, click one of these buttons!
function game:init() --initial preparation, draw background, panel, etc... startGame() end local function moveObject() for i = grpBomb:getNumChildren(), 1, -1 do local bomb = grpBomb:getChildAt(i) bomb:getX() = bomb:getX() + 1 --it's up to you end end local function runGame(event) if gameIsActive then frameCount = frameCount + 1 moveObject() end end function startListeners() stage:addEventListener(Event.ENTER_FRAME, runGame) end function stopListeners() stage:removeEventListener(Event.ENTER_FRAME, runGame) end function startGame() stage:addChild(grpGame) grpGame:addChild(grpBackground) grpGame:addChild(grpBomb) --add any sprite group you want startListeners() end |