Self. Btn1: addTouchEventListener (function (sender, state)
If the state==2 then
If arr [5]==arr [4] then
The local arrR=self: createRandomNum ()
Self. Label1: setString (arrR [1])
Self. Label2: setString (arrR [2])
Self. Label3: setString (arrR [3])
Self. Label5: setString (arrR [5])
Right=Right + 1
Print (Right)
The else
The local GameOver=the require (" GameOver. Lua ")
The local gameover=gameover: the create ()
Cc. Director: getInstance () : replaceScene (gameover)
End
End
End)
CodePudding user response:
I also need to answerCodePudding user response:
Accidentally hit the wrong embarrassedCodePudding user response:
Can add a timer Schedule, call once per second, determine correct mistakes in the calling function is ok,CodePudding user response: