I am trying to write a script to measure reaction time.
It should show the 10 digits as buttons, then show a random digit and the user has to tap the same digit as fast as possible.
Here are my initial thoughts:
- "buttons": copy from one of the calculators
- random number: take out of the example script
- Show digit: got it
- time to reaction...
Here is where I got stuck...
I was thinking of simple variables (starttime = time() ) and endtime = time()) to measure the elapsed time, but I don't know where to put it...
I tired to put starttime in the setup for my scene and endtime in the touch_began, but it seems that they cannot share variables...