我在电晕制作主菜单中的场景,但我遇到一个错误,它的驾驶我疯狂。
编译器可以十分困惑,我理解它是什么,但我可以指出,从它2个问题:
- 尝试调用全球的“startButtonListeners”
- [C]在函数 “startButtonListeners”
下面是一段代码:
function scene:enterScene(event)
local group = self.view
startButtonListeners('add')
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
end