xxxxxxxxxx
80
var Score
var Yspeed
var Y
var speed
var X
function setup() {
createCanvas(600, 400);
Y = random(0, height)
X = random(0, width)
Yspeed = 3
speed = 3
setInterval(Reset, 30000)
Score = 0
}
function draw() {
background(220);
text("You Have 30 Seconds GOOO!", 400, 395)
if (X > width) {
speed = -3
}
text('Points ' + Score, 20, 20)
text("Hold Left Click To Start Resetting", 200, 20)
mX = mouseX
mY = mouseY
ellipse(X, Y, 50)
if (X < 0) {
speed = 3
}
if (Y > height) {
Yspeed = -3
}
if (Y < 0) {
Yspeed = 3
}
X = X + speed
Y = Y + Yspeed
ellipse(mouseX, mouseY, 50)
if (mouseX < X + 5 && mouseX > X - 5 && mouseY < Y + 5 && mouseY > Y - 5) {
text("Wow AMAZING ACCUUUURACCCYY", 200, 400)
print("Wow")
Reset();
}
if (mouseX < X + 25 && mouseX > X - 25 && mouseY < Y + 25 && mouseY > Y - 25) {
Score = Score + 0.02
}
if (mouseIsPressed) {
Score = 0
Y = random(0, height)
X = random(0, width)
setInterval(Reset, 300000)
Yspeed = 3
speed = 3
text("Choosing Random Place (Realease to stop)", 100, 200)
}
text("Move with your mouse go near the circle to get points but not too close", 10, 395)
}
function Reset() {
X = 1000000
}