xxxxxxxxxx
38
/*
* https://findtheinvisiblecow.com/
*
* A clone of a popular game for first time coders
* (c) 2018 - Andrew Grosser - https://twitter.com/andrewgrosser
*
* Scroll to the bottom of the page to start!
*/
//Share global variables
var moo;
var cow;
var wahoo;
var x_width = 400;
var y_height = 400;
var found = false;
var x_cow = 250;
var y_cow = 250;
//Do this before anything
function preload() {
//soundbible.com
moo = loadSound('https://s3.amazonaws.com/findthe/cow.mp3');
wahoo = loadSound('https://s3.amazonaws.com/findthe/wahoo.mp3');
//wikipedia
cow = loadImage('https://s3.amazonaws.com/findthe/cow.svg');
}
//Run p5js setup
function setup() {
createCanvas(x_width, y_height);
moo.play();
}
//Here we draw/run our infinite loop
function draw() {
ellipse(mouseX,mouseY,20,20)
}