0
4

1 回答 1

1

将函数的位置更改startButtonListeners到末尾;完成函数定义后:

scene:enterScene(event)
    local group = self.view 

    function startButtonListeners(action)
      if(action == 'add') then  
         aboutBtn:addEventListener('tap', showCredits)
         startBtn:addEventListener('tap', startBtn)
      end 

      local function onSceneTouch( self, event )
        if event.phase == "began" then
        storyboard.gotoScene( "scene1", fade, 500 )
        return true
      end
    end 
    startButtonListeners('add')
end
于 2013-04-02T12:05:06.903 回答