xxxxxxxxxx
80
let scene = 0;
function setup() {
createCanvas(400, 400);
}
function draw() {
switch (scene) {
case 0:
// title
// stuff goes in here
background('red');
if (millis() > 5000) {
scene++;
}
break;
case 3:
case 1:
// walking to apartment
// stuff goes in here
background('blue');
break;
case 2:
// hourglasses
break;
default:
break;
}
textSize(32);
fill(0);
text(scene, 20, 30);
/*
if( scene === 0 ){
} else if (scene === 1 || scene === 3 ){
}
*/
}
function mousePressed() {
scene++;
if (scene >= 2) {
scene = 0;
}
}
function keyPressed() {
// will prevent the default key event
return false;
}