/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://studio.sketchpad.cc/sp/pad/view/ro.BZnwXtAaOss/rev.2788
*
* authors:
* Sam Farmer
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
/*
This sketch builds on a prior work, "Untitled Sketch", created by Sam
http://sketchpad.cc/sp/pad/view/ro.Ry4jUJR37Zc/rev.15
*/
// Pressing Control-R will render this sketch.
int i = 0;
String p = "Please";
String d = "don't";
String e = "EAT";
String m = "me!!";
//char x = 'p';
int foo=0;
int fishWidth=150;
int fishHeight=100;
int fishX=50;
int fishY=200;
int sharkX=100;
int sharkY=100;
int sharkWidth=150;
int sharkHeight=100;
void setup() { // this is run once.
// set the background color
background(149,221,245);
// canvas size (Integers only, please.)
size(500, 400);
// smooth edges
smooth();
// limit the number of frames per second
frameRate(30);
textSize(24);
}
void draw() {
stroke(227,167,2);
fill(252,158,5);
strokeWeight(4);
quad(fishX-55, fishY-25, fishX-55, fishY+25, fishX-105, fishY+45, fishX-105, fishY-45);
stroke(227,167,2);
fill(252,158,5);
strokeWeight(4);
triangle(fishX+40, fishY-42, fishX-35, fishY-42, fishX-25, fishY-70);
stroke(227,167,2);
fill(252,158,5);
strokeWeight(4);
quad(fishX, fishY+48, fishX-6, fishY+48, fishX-12, fishY+63, fishX-6, fishY+63);
stroke(252,252,5);
strokeWeight(2);
fill(252,203,5);
ellipse(fishX, fishY, fishWidth, fishHeight);
stroke(255,0,0);
strokeWeight(1);
fill(255,0,0);
quad(fishX+70, fishY, fishX+75, fishY-5, fishX+80, fishY, fishX+75, fishY+5);
stroke(255,255,255);
strokeWeight(4);
fill(0,0,0);
ellipse(fishX+50, fishY-15, 10, 10);
stroke(227,167,2);
fill(252,158,5);
strokeWeight(4);
triangle(fishX+25, fishY+10, fishX+15, fishY+30, fishX+10, fishY+20);
stroke(255,255,255);
strokeWeight(3);
fill(213,349,247);
ellipse(mouseX, mouseY, 15, 15);
ellipse(mouseX+27, mouseY-18, 20, 20);
ellipse(mouseX-12, mouseY-5, 5, 5);
ellipse(mouseX+5, mouseY+7, 10, 10);
ellipse(mouseX-20, mouseY-20, 25,25);
stroke(0,0,0);
fill(0,0,0);
if((i%10)==0){
if(foo==0){
i++;
foo++;
}
else if(foo==1){
background(149,221,225);
text(p, 50, 50);
i++;
foo++;
fishX=fishX+100;
fishY=fishY+20;
} else if(foo==2){
background(149,221,225);
text(p, 50,50);
text(d, 150, 50);
i++;
foo++;
fishX=fishX+100;
fishY=fishY-20;
}
else if(foo==3){
background(149,221,225);
text(p, 50,50);
text(d, 150, 50);
text(e, 250, 50);
i++;
foo++;
fishX=fishX+100;
fishY=fishY-20;
}
else if (foo==4){
background(149,221,225);
text(p, 50,50);
text(d, 150, 50);
text(e, 250, 50);
text(m, 350, 50);
i++;
foo++;
fishX=fishX+100;
fishY=fishY+20;
}
else{
background(149,221,225);
foo=0;
fishX=50;
fishY=200;}
}else {
i++;}
}
void mouseClicked(){
sharkX=mouseX+random(-100, 100);
sharkY=mouseY+random(-150,150);
sharkWidth=100;
sharkHeight=50;
noStroke();
fill(180);
rect(sharkX, sharkY, sharkWidth, sharkHeight);
triangle(sharkX, sharkY, sharkX, sharkY+sharkHeight, sharkX-75, sharkY+(1/2)*sharkHeight);
triangle(sharkX-75, sharkY+(1/2)*sharkHeight, sharkX-100, sharkY+(1/2)*sharkHeight+20, sharkX-100, sharkY+(1/2)*sharkHeight-20);
triangle(sharkX+(1/3)*sharkWidth, sharkY, sharkX+(2/3)*sharkWidth, sharkY, sharkX+(2/5)*sharkWidth, sharkY-30);
triangle(sharkX+sharkWidth, sharkY, sharkX+sharkWidth, sharkY+sharkHeight, sharkX+(3/2)*sharkWidth, sharkY-10);
triangle(sharkX+sharkWidth, sharkY,sharkX+sharkWidth, sharkY+sharkHeight, sharkX+(3/2)*sharkWidth, sharkY+sharkHeight+10);
stroke(255);
fill(0);
strokeWeight(3);
ellipse(sharkX+sharkWidth+10, sharkY+20, 10, 10);
}