xxxxxxxxxx
57
let mpFont;
let photo;
function preload() {
mpFont = loadFont('MPFont.ttf');
photo = loadImage("Goomba.png");
}
function setup() {
createCanvas(820, 664);
let from = color(255, 135, 0);
let to = color(0, 240, 255);
let interA = lerpColor(from, to, 0);
background(interA);
noStroke();
for (let i = 0; i < 664; i = i + 6.64){
fill(lerpColor(from, to, 0 + i * 0.0015))
rect(0, i, 820, 7);
}
fill(200);
strokeWeight(4);
rect(15, 95, 785, 555, 20);
fill('#ED225D');
textFont(mpFont);
textSize(100);
text('Goomba Spotting', 60, 80)
textSize(50);
text('Goombas have invaded NYUAD!', 25, 130);
text('You two have been hired as', 25, 170);
text('Goomba Spotters to assist with', 25, 210);
text('the resistance effort.', 25, 250);
text('Your task: To count the exact', 25, 290);
text('number of Goombas that pass by.', 25, 330);
text('A last-minute refresher!', 25, 370);
text('Goombas look like:', 25, 430);
text('Tap once for each Goomba you see!', 25, 490);
text('Player 1: Tap on the A key!', 25, 530);
text('Player 2: Tap on the L key!', 25, 570);
text('Good luck, Spotters.', 25, 630);
image(photo, 420, 380, 58.8, 70);
strokeWeight(4);
rect(610, 510, 190, 140, 20);
fill(0);
text('START!', 615, 595);
}
function draw() {
//background(220);
if (mouseIsPressed === true) {
if (610 < mouseX && mouseX < 800 && 510 < mouseY && mouseY < 650){
print("Yes");
}
else{
print("No");
}
}
}