Can't see how delay works.

Script looks like the following, but "other" and "stuff" appear at the same time after the delay. I want them to have delay between each other and I also want to start "void stuff" only from "void other", so what should I do?

PFont allfont;

void setup() {
  size(1280,720);
  allfont = createFont("8bitoperator_jve.ttf",100);
  textFont(allfont);
  textAlign(CENTER,CENTER);
  other();
}

void other() {
  text("other",width/2,height/2);
  stuff();
}

void stuff() {
  delay(1000);
  text("stuff",width/2 + 250,height/2);
}
Tagged:

Answers

Sign In or Register to comment.