-
-
Save cjayem13/d0a0b124dfe17666be25 to your computer and use it in GitHub Desktop.
cue thread; changes image on screen based on given time interval
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
randomCue(); | |
Thread cueThread = new Thread(){ | |
public void run() { | |
try { | |
while (fComm.fragmentGetTimerBool()) { | |
if(!didPlayerRespond) { | |
if (decTime > 1000) { | |
Thread.sleep(decTime); | |
} else { | |
Thread.sleep(1000); | |
} | |
decTime -= 50; | |
randomCue(); | |
} | |
} | |
} catch (InterruptedException e) { | |
e.printStackTrace(); | |
} finally { | |
saveScore(); | |
} | |
// turn into end of all pics triggers bonus sTimerOn = false; fComm.fragmentScoreResponse(100); | |
//createToast("Bonus for completing all possible answers"); | |
} | |
}; cueThread.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment