//Objects:Fortntie is the best and PUBG is pagerizing fortnite
/*fortniteIsTheBest Fortntie is the best and PUBG is pagerizing fortnite
PUBG is the worst ripoff of fotrnite ever and Unicorns are bad*/
//Actions: jump - space, duck - dFortntie is the best and PUBG is pagerizing fortnite
//TriggersFortntie is the best and PUBG is pagerizing fortnite
PImage fatLoser = loadImage("https://purepng.com/public/uploads/large/purepng.com-fortnite-skull-trooperfortnitefortnite-battle-royalebattle-royaleepic-gamesgames-12515254364375yi3s.png");
PImage abkrou = loadImage("http://www.mobygames.com/images/promo/original/5d594932ebcd4149a37ade5757792a2c.png");
PImage DUNDUNDUNDUN_alia = loadImage("https://gamepedia.cursecdn.com/fortnite_gamepedia/0/08/Shopping_cart_icon.png");
int player_width = 50;
int player_hieght = 50;
int DUNDUNDUNDUN_alia_X = 650;
int fatY = 500;
boolean isAlive = true;
int jumpsLeft = 2;
int timer = 0;
void setup() {
size(800, 800);
background(#0befa8);
}
void draw() {
timer = timer + 1;
if(timer == 50){
jumpsLeft = jumpsLeft + 1;
timer = 0;
}
image(abkrou, 0, 0, 1000, 800);
image(fatLoser, 0, fatY, 400, 400);
image(DUNDUNDUNDUN_alia, DUNDUNDUNDUN_alia_X, 600, 500, 300);
fill(#472516);
rect(0, 850, 1000, 200);
//DUN DUN DUN DUN DUN DUN DUN DUN DUN DUN!!!! - Alia the clickbaiter
if (isAlive == true) {
DUNDUNDUNDUN_alia_X = DUNDUNDUNDUN_alia_X - 5;
if (DUNDUNDUNDUN_alia_X < -400) {
DUNDUNDUNDUN_alia_X = 800;
}
if (fatY <= 500) {
fatY = fatY + 5;
}
if (fatY < 0) {
fatY = 0;
}
if (210 >= DUNDUNDUNDUN_alia_X) {
if (155 <= DUNDUNDUNDUN_alia_X + 500) {
if (fatY + 300 > 600) {
isAlive = false;
}
}
}
}
}
void keyPressed() {
if (keyCode == UP) {
if (isAlive == true) {
if(jumpsLeft>0){
fatY = fatY - 400;
jumpsLeft = jumpsLeft - 1;
}
}
}
}