Home > other >  How to create a scoring function according to the mouse to click order
How to create a scoring function according to the mouse to click order

Time:09-22

Such as scenario there are red, orange, yellow, green, blue, violet seven pictures I want to set for the first red the second yellow,,,,,,,,, and then click the mouse click on the yellow points for the first time the other color is wrong not points, the second click on the Red Cross points click other colors don't add cent, the rest of the and so on, the last seven pictures click will be displayed after the completion of the total score, there are a great god can tell

CodePudding user response:

7 images in sequence in an array, the subscript for imgIndex
Record click clickIndex, after each click + 1
When judging the current per click click picture imgIndex==clickIndex points, otherwise not
  • Related