Perhaps because you don't play it? At least, my eyes doesn't see anything like that in the code you show.
Side notes:
- Put size() at the top of setup().
- You will load img2 on each frame after 5 seconds...
Try:
Side notes:
- Put size() at the top of setup().
- You will load img2 on each frame after 5 seconds...
Try:
- if(millis()<5000)
- {
- image(img1, 0, 0);
- }
- else{
- if (img2 == null) {
- img2 = loadImage("gamescreen.jpg");
- }
- image(img2,0,0);
- //rest of code
- }
- }