diff --git a/ReturningValues/ReturningValues.pde b/ReturningValues/ReturningValues.pde index 8b13789..64e34a6 100644 --- a/ReturningValues/ReturningValues.pde +++ b/ReturningValues/ReturningValues.pde @@ -1 +1,22 @@ +float c; +PImage art; +void setup(){ + size(600,600); + art = loadImage("art.jpg"); +} + +void draw(){ + background(art); + c = PythagoreanTheorem(); + textSize(100); + textAlign(CENTER, CENTER); + text(c,300,300); +} + +float PythagoreanTheorem(){ + float a= 6; + float b= 5; + float c= sqrt(sq(a)+sq(b)); + return c; +} \ No newline at end of file diff --git a/ReturningValues/data/art.jpg b/ReturningValues/data/art.jpg new file mode 100644 index 0000000..c1473b3 Binary files /dev/null and b/ReturningValues/data/art.jpg differ diff --git a/VoidFunctions/VoidFunctions.pde b/VoidFunctions/VoidFunctions.pde index 8b13789..f88c338 100644 --- a/VoidFunctions/VoidFunctions.pde +++ b/VoidFunctions/VoidFunctions.pde @@ -1 +1,49 @@ +//name variables +PImage derp; +PImage icecream; +float gameMode; +void setup() { + //set canvas size + size(600, 600); + + //load image + derp = loadImage("newderp.png"); + icecream = loadImage("icecream.png"); + + gameMode=0; +} + +void draw() { + //create background + background(300,300,300); + + if(gameMode==0){ + fill(0); + textSize(30); + text("Help Kanye reach his true love",80,height/2); + } + if (gameMode==1) { + drawIceCreamAt(random(width),random(height)); + drawKanyeAt(mouseX-400,mouseY-300); + } +} + + +void drawKanyeAt(float x, float y) { + x = mouseX-200; + y = mouseY-150; + image(derp, x, y); + derp.resize(400,300); +} + +void drawIceCreamAt(float i, float j){ + i = random(width)-37.5; + j = random(height)-50; + image(icecream, i, j); + icecream.resize(75,100); +} + +void mousePressed(){ + 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..9734b6f 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