Processing Forum
I have this processing app that contains 2 functions. 1st is called loadScreen. 2nd is called mainMenu. When the app initializes, it calls the function "loadScreen();". I set a timer inside this function so that after 5 seconds, it will jump to "mainMenu". The problem is that how do I stop my function and call another function? Is there a "break;" or "stop" function that I can use? Thanks!
void loading() { //Code to load start screen if (millis() - time >= wait) { time = millis();//also update the stored time image(loadingImage, 0, 0); } if (time/1000 == 5) { time=5000; // Stop here startMenu(); } } void startMenu() { //Code to load the real game text("Start", 350, 300); }
. I want to tell the program that when ever my snake touches my target food, it should regenerate the question and how do I do that? Thanks.float questions = random(1, 3);int question = int(questions);