diff --git a/VoidFunctions/VoidFunctions.pde b/VoidFunctions/VoidFunctions.pde index 8b13789..5b1ee2c 100644 --- a/VoidFunctions/VoidFunctions.pde +++ b/VoidFunctions/VoidFunctions.pde @@ -1 +1,61 @@ +//name variables +PImage derp; +PImage icecream; +float gameMode; +float i; +float j; +void setup() { + //set canvas size + size(600, 600); + + //load image + derp = loadImage("newderp.png"); + icecream = loadImage("icecream.png"); + + //set ice cream location and game mode + i = random(37.5, width - 37.5)-37.5; + j = random(50, height - 50)-50; + gameMode=0; +} + +void draw() { + //create background + background(300,300,300); + + //initiate game if user clicks + if(gameMode==0){ + fill(0); + textSize(30); + text("Help Kanye reach his true love",80,height/2); + } + if (gameMode==1) { + drawKanyeAt(mouseX-400,mouseY-300); + drawIceCream(); + } + + if(mouseX <= i + 37.5 && mouseX >= i - 37.5){ + if(mouseY <= j + 50 && mouseY >= j - 50){ + drawIceCream(); + } + } +} + +//draw Kanye where cursor is +void drawKanyeAt(float x, float y) { + x = mouseX-170; + y = mouseY-190; + image(derp, x, y); + derp.resize(400,300); +} + +//generate random ice cream +void drawIceCream(){ + image(icecream, i, j); + icecream.resize(75,100); +} + +void mousePressed(){ + //initiate game when user clicks + gameMode=1; +} \ No newline at end of file diff --git a/VoidFunctions/data/icecream.png b/VoidFunctions/data/icecream.png new file mode 100644 index 0000000..a9bdbf8 Binary files /dev/null and b/VoidFunctions/data/icecream.png differ diff --git a/VoidFunctions/data/newderp.png b/VoidFunctions/data/newderp.png new file mode 100644 index 0000000..163a658 Binary files /dev/null and b/VoidFunctions/data/newderp.png differ diff --git a/VoidFunctions/data/neweyes.png b/VoidFunctions/data/neweyes.png new file mode 100644 index 0000000..be88249 Binary files /dev/null and b/VoidFunctions/data/neweyes.png differ