/*
Pizza Clicker
You click a pizza to gain cheese, which you can buy toppings with.
Toppings make your clicks worth more cheese.
The upper left hand shows how much cheese you have
You can click buttons to buy toppings
The goal is to gain as much cheese as possible
In the beginning you have a cheese pizza,and when you buy toppings they appear on your pizza
OBJECTS:
Pizza
Toppings: pepperoni, meatballs, pineapple
Currency (Cheese)
Buttons you can use to buy the toppings
TRIGGERS/ACTIONS:
When you tap the pizza it gives you 1 cheese per click in the beginning
Every pepperoni you buy makes you get 1 more cheese per click
When you click the buttons you can buy another topping
The buttons display how many you have bought of that topping, how much cheese it costs, and what topping it is.
You can buy the first pepperoni for 25 cheese
Every pepperoni after that costs more
Every pepperoni you buy increases the amount of cheese you earn by 1
You can buy the first meatball for 250 cheese
Every meatball after that costs more
Every meatball you buy increases the amount of cheese you earn by 5
Every pineapple costs 1000000000 cheese
Every pineapple after that costs 1000000000 cheese more
Every pineapple gives a special suprise ;)
*/
PImage image;
PImage image2;
PImage image3;
int cheese = 0;
int pepperoni = 0;
/*float pepperoniX = random(60,540);
float pepperoniY = random(60,540);*/
int oof = 25;
int dab = 250;
int yeet = 1000000000;
float[] pepX = new float[100];
float[] pepY = new float[100];
int numPep = 0;
int meatball = 0;
float[] meatX = new float[100];
float[] meatY = new float[100];
int nummeat = 0;
int numPine = 0;
float[] PineX = new float[100];
float[] PineY = new float[100];
int pineapple = 0;
void setup(){
size(1000,600);
rectMode(CENTER);
image = loadImage("https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDK5x0wZ-Gl_lH1BBJrcqOGLBb05AXhJnfEHMyD86gEKcoHWLM3w");
image2 = loadImage("http://www.clker.com/cliparts/l/Q/o/O/O/S/meatball-md.png");
image3 = loadImage("https://www.pngkey.com/png/detail/378-3789503_pineapple-pia-kawaii-sticker-liz-png-pina-kawaii.png");
}
void draw(){
background(255);
image(image,0,0,600,600);
stroke(0);
strokeWeight(3);
textSize(50);
fill(0);
text("Cheese owned: "+ cheese,525,60);
textSize(40);
text("Pepperoni: "+ oof+" cheese",566,130);
if(cheese<oof){
fill(255,0,0);
text("Not Enough Cheese",580,95);
}
fill(255,0,0);
ellipse(750,170,60,60);
for(int i = 0; i < numPep; i++){
ellipse(pepX[i], pepY[i], 60,60);
}
fill(0);
text("Meatball: "+ dab+" cheese",606,235);
image(image2,600,250,190,60);
for(int i = 0; i < nummeat; i++){
image(image2,meatX[i],meatY[i],190,60);
}
if(cheese<dab){
fill(255,0,0);
text("Not Enough Cheese",610,335);
}
fill(0);
text("Pineapple: "+ yeet+" cheese",606,370);
image(image3,730,380,60,60);
for(int i = 0; i < numPine; i++){
image(image3,PineX[i],PineY[i],60,60);
}
if(cheese<yeet){
fill(255,0,0);
text("Not Enough Cheese",600,470);
}
}
void mousePressed(){
if(dist(mouseX,mouseY,300,300) < 300){
cheese = cheese + 1 + pepperoni+meatball-pineapple*10;
}
if(dist(mouseX,mouseY,750,150) < 30 && cheese > oof-1){
pepperoni = pepperoni + 1;
cheese = cheese- oof;
oof= oof+5*pepperoni;
pepX[numPep] = random(100,480);
pepY[numPep] = random(100,480);
numPep++;
}
if(dist(mouseX,mouseY,756,280) < 30 && cheese > dab-1){
meatball = meatball + 5;
cheese = cheese- dab;
dab= dab+15*meatball;
meatX[nummeat] = random(100,400);
meatY[nummeat] = random(100,530);
nummeat++;
}
if(dist(mouseX,mouseY,730,380) < 30 && cheese > yeet-1){
pineapple = pineapple + 1;
cheese = cheese- yeet;
yeet= yeet+100*pineapple;
pepperoni=0;
nummeat=0;
PineX[numPine] = random(100,480);
PineY[numPine] = random(100,480);
numPine++;
}
}