Skip to content

Instantly share code, notes, and snippets.

@cjayem13
Last active August 29, 2015 14:05
Show Gist options
  • Save cjayem13/d0a0b124dfe17666be25 to your computer and use it in GitHub Desktop.
Save cjayem13/d0a0b124dfe17666be25 to your computer and use it in GitHub Desktop.
cue thread; changes image on screen based on given time interval
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