Skip to content

Instantly share code, notes, and snippets.

@cjayem13
Last active August 29, 2015 14:05
Show Gist options
  • Save cjayem13/d32446ceb8c6d9626c68 to your computer and use it in GitHub Desktop.
Save cjayem13/d32446ceb8c6d9626c68 to your computer and use it in GitHub Desktop.
Section of EasyFragment that controls when cues are shown after the player responds
public void delayedRandomCue(final long a){
didPlayerRespond = true;
createToast("start of delayed RandomCue Method");
randomCue();
Thread delay = new Thread() {
public void run() {
try {
createToast("start of delay");
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}finally {
createToast("end of delay");
didPlayerRespond = false;
}
}
};delay.start();
createToast("end of delayed RandomCue Method");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment