Created
December 16, 2015 06:59
-
-
Save danaabs/bdb8eb50001ca2edce65 to your computer and use it in GitHub Desktop.
Blackmarket Vending Machine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//image variable | |
var keypad; | |
var shopping; | |
var chips; | |
var fritos; | |
var pretzel; | |
var kidney; | |
var thief; | |
var harvard; | |
var sex_worker; | |
var southAfrica; | |
var hitman; | |
var payday; | |
var tiger; | |
var animalCracker; | |
var ak47; | |
var warheads; | |
var meth; | |
var coke; | |
var girls; | |
var sourKids; | |
//var priceListy = 20; | |
//var dog; | |
//flag variables | |
var i_flag; | |
var u_flag; | |
var sa_flag; | |
var sg_flag; | |
var rs_flag; | |
var bn_flag; | |
var sv_flag; | |
var bg_flag; | |
var nd_flag; | |
var it_flag; | |
var fr_flag; | |
var bo_flag; | |
var mx_flag; | |
var dead_flag; | |
var live_flag; | |
var penis_flag; | |
var skin_flag; | |
var iq_flag; | |
var sd_flag; | |
var au_flag; | |
var sk_flag; | |
var gm_flag; | |
var cm_flag; | |
var rm_flag; | |
var ky_flag; | |
var mz_flag; | |
//country DOM element variables | |
var israel; | |
var usa; | |
var southAfrica; | |
var singapore; | |
var russia; | |
var bangladesh; | |
var siliconValley; | |
var bulgaria; | |
var netherlands; | |
var italy; | |
var france; | |
var bolivia; | |
var mexico; | |
var dead; | |
var live; | |
var penis; | |
var skin; | |
var iraq; | |
var sudan; | |
var australia; | |
var southKorea; | |
var germany; | |
var cambodia; | |
var romania; | |
var kenya; | |
var mozambique; | |
//div variables | |
var div1, div2, div3, div4, div5, div6, div7, div8; | |
var flagX = 1180; | |
var flagY = 20; | |
//text variables | |
var myOpac; | |
var fontOpa; | |
var myFont; | |
var israelDiv; | |
/////// PRICE ON TOGGLES //////// | |
//kidney price toggles | |
var israelPriceOn = false; | |
var usaPriceOn = false; | |
var southAfricaPriceOn = false; | |
var singaporePriceOn = false; | |
//harvard degree toggles | |
var russiaPriceOn = false; | |
//prostitute toggles | |
var bangladeshPriceOn = false; | |
var siliconValleyPriceOn = false; | |
var bulgariaPriceOn = false; | |
var netherlandsPriceOn = false; | |
//contract killer toggles | |
var italyPriceOn = false; | |
var francePriceOn = false; | |
var boliviaPriceOn = false; | |
var mexicoPriceOn = false; | |
//tiger | |
var deadPriceOn = false; | |
var livePriceOn = false; | |
var penisPriceOn = false; | |
var skinPriceOn = false; | |
//ak47 | |
var iraqPriceOn = false; | |
var sudanPriceOn = false; | |
var australiaPriceOn = false; | |
//meth | |
var southKoreaPriceOn = false; | |
var germanyPriceOn = false; | |
var cambodiaPriceOn = false; | |
// girls | |
var romaniaPriceOn = false; | |
var kenyaPriceOn = false; | |
var mozambiquePriceOn = false; | |
var thiefOn = true; | |
//FLAG toggles | |
var i_flagOn = false; | |
var u_flagOn = false; | |
var sa_flagOn = false; | |
var sg_flagOn = false; | |
var rs_flagOn = false; | |
var bn_flagOn = false; | |
var sv_flagOn = false; | |
var bg_flagOn = false; | |
var nd_flagOn = false; | |
var it_flagOn = false; | |
var fr_flagOn = false; | |
var bo_flagOn = false; | |
var mx_flagOn = false; | |
var dead_flagOn = false; | |
var live_flagOn = false; | |
var penis_flagOn = false; | |
var skin_flagOn = false; | |
var iq_flagOn = false; | |
var sd_flagOn = false; | |
var au_flagOn = false; | |
var sk_flagOn = false; | |
var gm_flagOn = false; | |
var cm_flagOn = false; | |
var rm_flagOn = false; | |
var ky_flagOn = false; | |
var mz_flagOn = false; | |
function preload() { | |
myFont = loadFont('assets/VT323.ttf'); | |
keypad = loadImage("assets/keypad.png"); | |
shopping = loadSound("assets/shopping.mp3"); | |
chips = loadImage("assets/chips.png"); | |
fritos = loadImage("assets/fritos.png"); | |
pretzel = loadImage("assets/pretzel.png"); | |
kidney = loadImage("assets/kidney.jpg"); | |
thief = loadImage("assets/thief.png"); | |
harvard = loadImage("assets/harvard.jpg"); | |
sex_worker = loadImage("assets/sex_worker.png") | |
hitman = loadImage("assets/hitman.jpeg"); | |
payday = loadImage("assets/payday.png"); | |
tiger = loadImage("assets/tiger.jpg"); | |
animalCracker = loadImage("assets/animalcracker.jpg"); | |
ak47 = loadImage("assets/ak47.png"); | |
warheads = loadImage("assets/warheads.png"); | |
meth = loadImage("assets/meth.png"); | |
coke = loadImage("assets/coke.png"); | |
sourKids = loadImage("assets/sourKids.png"); | |
girls = loadImage("assets/girls.jpg"); | |
//flags | |
i_flag = loadImage("flags/israel.png"); | |
u_flag = loadImage("flags/usa.jpeg"); | |
sa_flag = loadImage("flags/southafrica.png"); | |
sg_flag = loadImage("flags/singapore.png"); | |
rs_flag = loadImage("flags/russia.jpg"); | |
bn_flag = loadImage("flags/bangladesh.png"); | |
sv_flag = loadImage("flags/siliconvalley.png"); | |
bg_flag = loadImage("flags/bulgaria.png"); | |
nd_flag = loadImage("flags/netherlands.png"); | |
it_flag = loadImage("flags/italy.png"); | |
fr_flag = loadImage("flags/france.png"); | |
bo_flag = loadImage("flags/bolivia.png"); | |
mx_flag = loadImage("flags/mexico.png"); | |
dead_flag = loadImage("flags/dead.png"); | |
live_flag = loadImage("flags/live.png"); | |
penis_flag = loadImage("flags/penis.jpg"); | |
skin_flag = loadImage("flags/skin.jpg"); | |
iq_flag = loadImage("flags/iraq.png"); | |
sd_flag = loadImage("flags/sudan.jpg"); | |
au_flag = loadImage("flags/australia.png"); | |
sk_flag = loadImage("flags/southkorea.png"); | |
gm_flag = loadImage("flags/germany.png"); | |
cm_flag = loadImage("flags/cambodia.png"); | |
rm_flag = loadImage("flags/romania.png"); | |
ky_flag = loadImage("flags/kenya.png"); | |
mz_flag = loadImage("flags/mozambique.png"); | |
} | |
function setup() { | |
createCanvas(1500, 800); | |
//createCanvas(windowWidth, windowHeight); | |
//keypad divs | |
div1 = createDiv(''); | |
div1.size(12, 12); | |
div1.position(1041, 238); | |
div1.mousePressed(function() { | |
//kidneyCountryOn = true; | |
israel.show(); | |
usa.show(); | |
southAfrica.show(); | |
singapore.show(); | |
i_flagOn = true; | |
u_flagOn = true; | |
sa_flagOn = true; | |
sg_flagOn = true; | |
///turn off | |
italy.hide(); | |
france.hide(); | |
bolivia.hide(); | |
mexico.hide(); | |
bangladesh.hide(); | |
siliconValley.hide(); | |
bulgaria.hide(); | |
netherlands.hide(); | |
russia.hide(); | |
dead.hide(); | |
live.hide(); | |
penis.hide(); | |
skin.hide(); | |
iraq.hide(); | |
sudan.hide(); | |
australia.hide(); | |
southKorea.hide(); | |
germany.hide(); | |
cambodia.hide(); | |
romania.hide(); | |
kenya.hide(); | |
mozambique.hide(); | |
rs_flagOn = false; | |
bn_flagOn = false; | |
sv_flagOn = false; | |
bg_flagOn = false; | |
nd_flagOn = false; | |
it_flagOn = false; | |
fr_flagOn = false; | |
bo_flagOn = false; | |
mx_flagOn = false; | |
dead_flagOn = false; | |
live_flagOn = false; | |
penis_flagOn = false; | |
skin_flagOn = false; | |
iq_flagOn = false; | |
sd_flagOn = false; | |
au_flagOn = false; | |
sk_flagOn = false; | |
gm_flagOn = false; | |
cm_flagOn = false; | |
rm_flagOn = false; | |
ky_flagOn = false; | |
mz_flagOn = false; | |
}); | |
div2 = createDiv(''); | |
div2.size(12, 12); | |
div2.position(1069, 238); | |
div2.mousePressed(function() { | |
//harvardCountryOn = true; | |
russia.show(); | |
rs_flagOn = true; | |
//off | |
bangladesh.hide(); | |
siliconValley.hide(); | |
bulgaria.hide(); | |
netherlands.hide(); | |
italy.hide(); | |
france.hide(); | |
bolivia.hide(); | |
mexico.hide(); | |
israel.hide(); | |
usa.hide(); | |
southAfrica.hide(); | |
singapore.hide(); | |
dead.hide(); | |
live.hide(); | |
penis.hide(); | |
skin.hide(); | |
iraq.hide(); | |
sudan.hide(); | |
australia.hide(); | |
southKorea.hide(); | |
germany.hide(); | |
cambodia.hide(); | |
romania.hide(); | |
kenya.hide(); | |
mozambique.hide(); | |
i_flagOn = false; | |
u_flagOn = false; | |
sa_flagOn = false; | |
sg_flagOn = false; | |
bn_flagOn = false; | |
sv_flagOn = false; | |
bg_flagOn = false; | |
nd_flagOn = false; | |
it_flagOn = false; | |
fr_flagOn = false; | |
bo_flagOn = false; | |
mx_flagOn = false; | |
dead_flagOn = false; | |
live_flagOn = false; | |
penis_flagOn = false; | |
skin_flagOn = false; | |
iq_flagOn = false; | |
sd_flagOn = false; | |
au_flagOn = false; | |
sk_flagOn = false; | |
gm_flagOn = false; | |
cm_flagOn = false; | |
rm_flagOn = false; | |
ky_flagOn = false; | |
mz_flagOn = false; | |
}); | |
div3 = createDiv(''); | |
div3.size(12, 12); | |
div3.position(1097, 238); | |
div3.mousePressed(function() { | |
//prostituteCountryOn = true; | |
bangladesh.show(); | |
siliconValley.show(); | |
bulgaria.show(); | |
netherlands.show(); | |
bn_flagOn = true; | |
sv_flagOn = true; | |
bg_flagOn = true; | |
nd_flagOn = true; | |
//off | |
israel.hide(); | |
usa.hide(); | |
southAfrica.hide(); | |
singapore.hide(); | |
russia.hide(); | |
italy.hide(); | |
france.hide(); | |
bolivia.hide(); | |
mexico.hide(); | |
dead.hide(); | |
live.hide(); | |
penis.hide(); | |
skin.hide(); | |
iraq.hide(); | |
sudan.hide(); | |
australia.hide(); | |
southKorea.hide(); | |
germany.hide(); | |
cambodia.hide(); | |
romania.hide(); | |
kenya.hide(); | |
mozambique.hide(); | |
i_flagOn = false; | |
u_flagOn = false; | |
sa_flagOn = false; | |
sg_flagOn = false; | |
rs_flagOn = false; | |
it_flagOn = false; | |
fr_flagOn = false; | |
bo_flagOn = false; | |
mx_flagOn = false; | |
dead_flagOn = false; | |
live_flagOn = false; | |
penis_flagOn = false; | |
skin_flagOn = false; | |
iq_flagOn = false; | |
sd_flagOn = false; | |
au_flagOn = false; | |
sk_flagOn = false; | |
gm_flagOn = false; | |
cm_flagOn = false; | |
rm_flagOn = false; | |
ky_flagOn = false; | |
mz_flagOn = false; | |
}); | |
div4 = createDiv(''); | |
div4.size(12, 12); | |
div4.position(1041, 262); | |
div4.mousePressed(function() { | |
italy.show(); | |
france.show(); | |
bolivia.show(); | |
mexico.show(); | |
it_flagOn = true; | |
fr_flagOn = true; | |
bo_flagOn = true; | |
mx_flagOn = true; | |
//off | |
israel.hide(); | |
usa.hide(); | |
southAfrica.hide(); | |
singapore.hide(); | |
russia.hide(); | |
bangladesh.hide(); | |
siliconValley.hide(); | |
bulgaria.hide(); | |
netherlands.hide(); | |
dead.hide(); | |
live.hide(); | |
penis.hide(); | |
skin.hide(); | |
iraq.hide(); | |
sudan.hide(); | |
australia.hide(); | |
southKorea.hide(); | |
germany.hide(); | |
cambodia.hide(); | |
romania.hide(); | |
kenya.hide(); | |
mozambique.hide(); | |
i_flagOn = false; | |
u_flagOn = false; | |
sa_flagOn = false; | |
sg_flagOn = false; | |
rs_flagOn = false; | |
bn_flagOn = false; | |
sv_flagOn = false; | |
bg_flagOn = false; | |
nd_flagOn = false; | |
dead_flagOn = false; | |
live_flagOn = false; | |
penis_flagOn = false; | |
skin_flagOn = false; | |
iq_flagOn = false; | |
sd_flagOn = false; | |
au_flagOn = false; | |
sk_flagOn = false; | |
gm_flagOn = false; | |
cm_flagOn = false; | |
rm_flagOn = false; | |
ky_flagOn = false; | |
mz_flagOn = false; | |
}); | |
div5 = createDiv(''); | |
div5.size(12, 12); | |
div5.position(1069, 262); | |
div5.mousePressed(function() { | |
live.show(); | |
dead.show(); | |
penis.show(); | |
skin.show(); | |
dead_flagOn = true; | |
live_flagOn = true; | |
penis_flagOn = true; | |
skin_flagOn = true; | |
//off | |
israel.hide(); | |
usa.hide(); | |
southAfrica.hide(); | |
singapore.hide(); | |
russia.hide(); | |
bangladesh.hide(); | |
siliconValley.hide(); | |
bulgaria.hide(); | |
netherlands.hide(); | |
italy.hide(); | |
france.hide(); | |
bolivia.hide(); | |
mexico.hide(); | |
iraq.hide(); | |
sudan.hide(); | |
australia.hide(); | |
southKorea.hide(); | |
germany.hide(); | |
cambodia.hide(); | |
romania.hide(); | |
kenya.hide(); | |
mozambique.hide(); | |
i_flagOn = false; | |
u_flagOn = false; | |
sa_flagOn = false; | |
sg_flagOn = false; | |
rs_flagOn = false; | |
bn_flagOn = false; | |
sv_flagOn = false; | |
bg_flagOn = false; | |
nd_flagOn = false; | |
it_flagOn = false; | |
fr_flagOn = false; | |
bo_flagOn = false; | |
mx_flagOn = false; | |
iq_flagOn = false; | |
sd_flagOn = false; | |
au_flagOn = false; | |
sk_flagOn = false; | |
gm_flagOn = false; | |
cm_flagOn = false; | |
rm_flagOn = false; | |
ky_flagOn = false; | |
mz_flagOn = false; | |
}); | |
div6 = createDiv(''); | |
div6.size(12, 12); | |
div6.position(1097, 262); | |
div6.mousePressed(function() { | |
//prostituteCountryOn = true; | |
iraq.show(); | |
sudan.show(); | |
australia.show(); | |
iq_flagOn = true; | |
sd_flagOn = true; | |
au_flagOn = true; | |
//off | |
israel.hide(); | |
usa.hide(); | |
southAfrica.hide(); | |
singapore.hide(); | |
russia.hide(); | |
italy.hide(); | |
france.hide(); | |
bolivia.hide(); | |
mexico.hide(); | |
dead.hide(); | |
live.hide(); | |
penis.hide(); | |
skin.hide(); | |
bangladesh.hide(); | |
siliconValley.hide(); | |
bulgaria.hide(); | |
netherlands.hide(); | |
southKorea.hide(); | |
germany.hide(); | |
cambodia.hide(); | |
romania.hide(); | |
kenya.hide(); | |
mozambique.hide(); | |
i_flagOn = false; | |
u_flagOn = false; | |
sa_flagOn = false; | |
sg_flagOn = false; | |
rs_flagOn = false; | |
it_flagOn = false; | |
fr_flagOn = false; | |
bo_flagOn = false; | |
mx_flagOn = false; | |
dead_flagOn = false; | |
live_flagOn = false; | |
penis_flagOn = false; | |
skin_flagOn = false; | |
bn_flagOn = false; | |
sv_flagOn = false; | |
bg_flagOn = false; | |
nd_flagOn = false; | |
sk_flagOn = false; | |
gm_flagOn = false; | |
cm_flagOn = false; | |
rm_flagOn = false; | |
ky_flagOn = false; | |
mz_flagOn = false; | |
}); | |
div7 = createDiv(''); | |
div7.size(12, 12); | |
div7.position(1041, 286); | |
div7.mousePressed(function() { | |
//kidneyCountryOn = true; | |
southKorea.show(); | |
germany.show(); | |
cambodia.show(); | |
sk_flagOn = true; | |
gm_flagOn = true; | |
cm_flagOn = true; | |
///turn off | |
italy.hide(); | |
france.hide(); | |
bolivia.hide(); | |
mexico.hide(); | |
bangladesh.hide(); | |
siliconValley.hide(); | |
bulgaria.hide(); | |
netherlands.hide(); | |
russia.hide(); | |
dead.hide(); | |
live.hide(); | |
penis.hide(); | |
skin.hide(); | |
iraq.hide(); | |
sudan.hide(); | |
australia.hide(); | |
israel.hide(); | |
usa.hide(); | |
southAfrica.hide(); | |
singapore.hide(); | |
romania.hide(); | |
kenya.hide(); | |
mozambique.hide(); | |
rs_flagOn = false; | |
bn_flagOn = false; | |
sv_flagOn = false; | |
bg_flagOn = false; | |
nd_flagOn = false; | |
it_flagOn = false; | |
fr_flagOn = false; | |
bo_flagOn = false; | |
mx_flagOn = false; | |
dead_flagOn = false; | |
live_flagOn = false; | |
penis_flagOn = false; | |
skin_flagOn = false; | |
iq_flagOn = false; | |
sd_flagOn = false; | |
au_flagOn = false; | |
i_flagOn = false; | |
u_flagOn = false; | |
sa_flagOn = false; | |
sg_flagOn = false; | |
rm_flagOn = false; | |
ky_flagOn = false; | |
mz_flagOn = false; | |
}); | |
div8 = createDiv(''); | |
div8.size(12, 12); | |
div8.position(1069, 286); | |
div8.mousePressed(function() { | |
romania.show(); | |
kenya.show(); | |
mozambique.show(); | |
rm_flagOn = true; | |
ky_flagOn = true; | |
mz_flagOn = true; | |
//off | |
bangladesh.hide(); | |
siliconValley.hide(); | |
bulgaria.hide(); | |
netherlands.hide(); | |
italy.hide(); | |
france.hide(); | |
bolivia.hide(); | |
mexico.hide(); | |
israel.hide(); | |
usa.hide(); | |
southAfrica.hide(); | |
singapore.hide(); | |
dead.hide(); | |
live.hide(); | |
penis.hide(); | |
skin.hide(); | |
iraq.hide(); | |
sudan.hide(); | |
australia.hide(); | |
southKorea.hide(); | |
germany.hide(); | |
cambodia.hide(); | |
russia.hide(); | |
i_flagOn = false; | |
u_flagOn = false; | |
sa_flagOn = false; | |
sg_flagOn = false; | |
bn_flagOn = false; | |
sv_flagOn = false; | |
bg_flagOn = false; | |
nd_flagOn = false; | |
it_flagOn = false; | |
fr_flagOn = false; | |
bo_flagOn = false; | |
mx_flagOn = false; | |
dead_flagOn = false; | |
live_flagOn = false; | |
penis_flagOn = false; | |
skin_flagOn = false; | |
iq_flagOn = false; | |
sd_flagOn = false; | |
au_flagOn = false; | |
sk_flagOn = false; | |
gm_flagOn = false; | |
cm_flagOn = false; | |
rs_flagOn = false; | |
}); | |
// Country div buttons under flag!! Add 25 to Y position | |
//kidney country div | |
israelDiv = createDiv(''); | |
israelDiv.size(200, 20); | |
israelDiv.position(flagX, flagY); | |
israelDiv.mousePressed(function() { | |
israelPriceOn = true; | |
}); | |
var usaDiv = createDiv(''); | |
usaDiv.size(100, 20); | |
usaDiv.position(flagX, flagY + 25); | |
usaDiv.mousePressed(function() { | |
usaPriceOn = true; | |
}); | |
var southAfricaDiv = createDiv(''); | |
southAfricaDiv.size(100, 20); | |
southAfricaDiv.position(flagX, flagY + 50); | |
southAfricaDiv.mousePressed(function() { | |
southAfricaPriceOn = true; | |
}); | |
var singaporeDiv = createDiv(''); | |
singaporeDiv.size(100, 20); | |
singaporeDiv.position(flagX, flagY + 75); | |
singaporeDiv.mousePressed(function() { | |
singaporePriceOn = true; | |
}); | |
//harvard diploma div | |
var russiaDiv = createDiv(''); | |
russiaDiv.size(100, 20); | |
russiaDiv.position(flagX, flagY + 100); | |
russiaDiv.mousePressed(function() { | |
russiaPriceOn = true; | |
}); | |
//prostitute divs | |
var bangladeshDiv = createDiv(''); | |
bangladeshDiv.size(100, 20); | |
bangladeshDiv.position(flagX, flagY + 125); | |
bangladeshDiv.mousePressed(function() { | |
bangladeshPriceOn = true; | |
}); | |
var siliconValleyDiv = createDiv(''); | |
siliconValleyDiv.size(100, 20); | |
siliconValleyDiv.position(flagX, flagY + 150); | |
siliconValleyDiv.mousePressed(function() { | |
siliconValleyPriceOn = true; | |
}); | |
var bulgariaDiv = createDiv(''); | |
bulgariaDiv.size(100, 20); | |
bulgariaDiv.position(flagX, flagY + 175); | |
bulgariaDiv.mousePressed(function() { | |
bulgariaPriceOn = true; | |
}); | |
var netherlandsDiv = createDiv(''); | |
netherlandsDiv.size(100, 20); | |
netherlandsDiv.position(flagX, flagY + 200); | |
netherlandsDiv.mousePressed(function() { | |
netherlandsPriceOn = true; | |
}); | |
//hitman divs | |
var italyDiv = createDiv(''); | |
italyDiv.size(100, 20); | |
italyDiv.position(flagX, flagY + 225); | |
italyDiv.mousePressed(function() { | |
italyPriceOn = true; | |
}); | |
var franceDiv = createDiv(''); | |
franceDiv.size(100, 20); | |
franceDiv.position(flagX, flagY + 250); | |
franceDiv.mousePressed(function() { | |
francePriceOn = true; | |
}); | |
var boliviaDiv = createDiv(''); | |
boliviaDiv.size(100, 20); | |
boliviaDiv.position(flagX, flagY + 275); | |
boliviaDiv.mousePressed(function() { | |
boliviaPriceOn = true; | |
}); | |
var mexicoDiv = createDiv(''); | |
mexicoDiv.size(100, 20); | |
mexicoDiv.position(flagX, flagY + 300); | |
mexicoDiv.mousePressed(function() { | |
mexicoPriceOn = true; | |
}); | |
var deadDiv = createDiv(''); | |
deadDiv.size(100, 20); | |
deadDiv.position(flagX, flagY + 325); | |
deadDiv.mousePressed(function() { | |
deadPriceOn = true; | |
}); | |
var liveDiv = createDiv(''); | |
liveDiv.size(100, 20); | |
liveDiv.position(flagX, flagY + 350); | |
liveDiv.mousePressed(function() { | |
livePriceOn = true; | |
}); | |
var penisDiv = createDiv(''); | |
penisDiv.size(100, 20); | |
penisDiv.position(flagX, flagY + 375); | |
penisDiv.mousePressed(function() { | |
penisPriceOn = true; | |
}); | |
var skinDiv = createDiv(''); | |
skinDiv.size(100, 20); | |
skinDiv.position(flagX, flagY + 400); | |
skinDiv.mousePressed(function() { | |
skinPriceOn = true; | |
}); | |
//ak47 | |
var iraqDiv = createDiv(''); | |
iraqDiv.size(100, 20); | |
iraqDiv.position(flagX, flagY + 425); | |
iraqDiv.mousePressed(function() { | |
iraqPriceOn = true; | |
}); | |
var sudanDiv = createDiv(''); | |
sudanDiv.size(100, 20); | |
sudanDiv.position(flagX, flagY + 450); | |
sudanDiv.mousePressed(function() { | |
sudanPriceOn = true; | |
}); | |
var australiaDiv = createDiv(''); | |
australiaDiv.size(100, 20); | |
australiaDiv.position(flagX, flagY + 475); | |
australiaDiv.mousePressed(function() { | |
australiaPriceOn = true; | |
}); | |
// meth | |
var southKoreaDiv = createDiv(''); | |
southKoreaDiv.size(100, 20); | |
southKoreaDiv.position(flagX, flagY + 500); | |
southKoreaDiv.mousePressed(function() { | |
southKoreaPriceOn = true; | |
}); | |
var germanyDiv = createDiv(''); | |
germanyDiv.size(100, 20); | |
germanyDiv.position(flagX, flagY + 525); | |
germanyDiv.mousePressed(function() { | |
germanyPriceOn = true; | |
}); | |
var cambodiaDiv = createDiv(''); | |
cambodiaDiv.size(100, 20); | |
cambodiaDiv.position(flagX, flagY + 550); | |
cambodiaDiv.mousePressed(function() { | |
cambodiaPriceOn = true; | |
}); | |
//girls | |
var romaniaDiv = createDiv(''); | |
romaniaDiv.size(100, 20); | |
romaniaDiv.position(flagX, flagY + 575); | |
romaniaDiv.mousePressed(function() { | |
romaniaPriceOn = true; | |
}); | |
var kenyaDiv = createDiv(''); | |
kenyaDiv.size(100, 20); | |
kenyaDiv.position(flagX, flagY + 600); | |
kenyaDiv.mousePressed(function() { | |
kenyaPriceOn = true; | |
}); | |
var mozambiqueDiv = createDiv(''); | |
mozambiqueDiv.size(100, 20); | |
mozambiqueDiv.position(flagX, flagY + 625); | |
mozambiqueDiv.mousePressed(function() { | |
mozambiquePriceOn = true; | |
}); | |
//clear div | |
var clearPriceDiv = createDiv(''); | |
clearPriceDiv.size(80, 20); | |
clearPriceDiv.position(1035, 190); | |
clearPriceDiv.mousePressed(function() { | |
allPriceOff(); | |
}); | |
//buy div | |
var buyDiv = createDiv('') | |
buyDiv.size(20, 20); | |
buyDiv.position(1108, 533); | |
buyDiv.mousePressed(function() { | |
buyShit(); | |
}); | |
//country name DOM elements. add 25 to Y position | |
var nameX = 1205; | |
var nameY = 8; | |
//kidney | |
israel = createP("israel"); | |
israel.style("color", "#00FF00"); | |
israel.style("font-family", "Courier"); | |
israel.position(nameX, nameY); | |
israel.style("font-size", "14px"); | |
israel.hide(); | |
usa = createP("usa"); | |
usa.style("color", "#00FF00"); | |
usa.style("font-family", "Courier"); | |
usa.position(nameX, nameY + 25); | |
usa.style("font-size", "14px"); | |
usa.hide(); | |
southAfrica = createP("south africa"); | |
southAfrica.style("color", "#00FF00"); | |
southAfrica.style("font-family", "Courier"); | |
southAfrica.position(nameX, nameY + 50); | |
southAfrica.style("font-size", "14px"); | |
southAfrica.hide(); | |
singapore = createP("singapore"); | |
singapore.style("color", "#00FF00"); | |
singapore.style("font-family", "Courier"); | |
singapore.position(nameX, nameY + 75); | |
singapore.style("font-size", "14px"); | |
singapore.hide(); | |
//harvard | |
russia = createP("russia"); | |
russia.style("color", "#00FF00"); | |
russia.style("font-family", "Courier"); | |
russia.position(nameX, nameY + 100); | |
russia.style("font-size", "14px"); | |
russia.hide(); | |
//prostitute | |
bangladesh = createP("bangladesh"); | |
bangladesh.style("color", "#00FF00"); | |
bangladesh.style("font-family", "Courier"); | |
bangladesh.position(nameX, nameY + 125); | |
bangladesh.style("font-size", "14px"); | |
bangladesh.hide(); | |
siliconValley = createP("silicon valley"); | |
siliconValley.style("color", "#00FF00"); | |
siliconValley.style("font-family", "Courier"); | |
siliconValley.position(nameX, nameY + 153); | |
siliconValley.style("font-size", "11px"); | |
siliconValley.hide(); | |
bulgaria = createP("bulgaria"); | |
bulgaria.style("color", "#00FF00"); | |
bulgaria.style("font-family", "Courier"); | |
bulgaria.position(nameX, nameY + 175); | |
bulgaria.style("font-size", "14px"); | |
bulgaria.hide(); | |
netherlands = createP("netherlands"); | |
netherlands.style("color", "#00FF00"); | |
netherlands.style("font-family", "Courier"); | |
netherlands.position(nameX, nameY + 200); | |
netherlands.style("font-size", "14px"); | |
netherlands.hide(); | |
//hitman | |
italy = createP("italy"); | |
italy.style("color", "#00FF00"); | |
italy.style("font-family", "Courier"); | |
italy.position(nameX, nameY + 225); | |
italy.style("font-size", "14px"); | |
italy.hide(); | |
france = createP("france"); | |
france.style("color", "#00FF00"); | |
france.style("font-family", "Courier"); | |
france.position(nameX, nameY + 250); | |
france.style("font-size", "14px"); | |
france.hide(); | |
bolivia = createP("bolivia"); | |
bolivia.style("color", "#00FF00"); | |
bolivia.style("font-family", "Courier"); | |
bolivia.position(nameX, nameY + 275); | |
bolivia.style("font-size", "14px"); | |
bolivia.hide(); | |
mexico = createP("mexico"); | |
mexico.style("color", "#00FF00"); | |
mexico.style("font-family", "Courier"); | |
mexico.position(nameX, nameY + 300); | |
mexico.style("font-size", "14px"); | |
mexico.hide(); | |
//tiger | |
dead = createP("dead"); | |
dead.style("color", "#00FF00"); | |
dead.style("font-family", "Courier"); | |
dead.position(nameX, nameY + 325); | |
dead.style("font-size", "14px"); | |
dead.hide(); | |
live = createP("live"); | |
live.style("color", "#00FF00"); | |
live.style("font-family", "Courier"); | |
live.position(nameX, nameY + 350); | |
live.style("font-size", "14px"); | |
live.hide(); | |
penis = createP("penis"); | |
penis.style("color", "#00FF00"); | |
penis.style("font-family", "Courier"); | |
penis.position(nameX, nameY + 375); | |
penis.style("font-size", "14px"); | |
penis.hide(); | |
skin = createP("skin"); | |
skin.style("color", "#00FF00"); | |
skin.style("font-family", "Courier"); | |
skin.position(nameX, nameY + 400); | |
skin.style("font-size", "14px"); | |
skin.hide(); | |
//ak47 | |
iraq = createP("iraq"); | |
iraq.style("color", "#00FF00"); | |
iraq.style("font-family", "Courier"); | |
iraq.position(nameX, nameY + 425); | |
iraq.style("font-size", "14px"); | |
iraq.hide(); | |
sudan = createP("sudan"); | |
sudan.style("color", "#00FF00"); | |
sudan.style("font-family", "Courier"); | |
sudan.position(nameX, nameY + 450); | |
sudan.style("font-size", "14px"); | |
sudan.hide(); | |
australia = createP("australia"); | |
australia.style("color", "#00FF00"); | |
australia.style("font-family", "Courier"); | |
australia.position(nameX, nameY + 475); | |
australia.style("font-size", "14px"); | |
australia.hide(); | |
//meth -- moved down "South Korea" so that it would fit | |
southKorea = createP("south korea"); | |
southKorea.style("color", "#00FF00"); | |
southKorea.style("font-family", "Courier"); | |
southKorea.position(nameX, nameY + 503); | |
southKorea.style("font-size", "12px"); | |
southKorea.hide(); | |
germany = createP("germany"); | |
germany.style("color", "#00FF00"); | |
germany.style("font-family", "Courier"); | |
germany.position(nameX, nameY + 525); | |
germany.style("font-size", "14px"); | |
germany.hide(); | |
cambodia = createP("australia"); | |
cambodia.style("color", "#00FF00"); | |
cambodia.style("font-family", "Courier"); | |
cambodia.position(nameX, nameY + 550); | |
cambodia.style("font-size", "14px"); | |
cambodia.hide(); | |
//girls | |
romania = createP("romania"); | |
romania.style("color", "#00FF00"); | |
romania.style("font-family", "Courier"); | |
romania.position(nameX, nameY + 575); | |
romania.style("font-size", "14px"); | |
romania.hide(); | |
kenya = createP("kenya"); | |
kenya.style("color", "#00FF00"); | |
kenya.style("font-family", "Courier"); | |
kenya.position(nameX, nameY + 600); | |
kenya.style("font-size", "14px"); | |
kenya.hide(); | |
mozambique = createP("mozambique"); | |
mozambique.style("color", "#00FF00"); | |
mozambique.style("font-family", "Courier"); | |
mozambique.position(nameX, nameY + 625); | |
mozambique.style("font-size", "14px"); | |
mozambique.hide(); | |
} | |
function draw() { | |
background(0); | |
////ITEMS IN VENDING///////////////////// | |
var row1 = height / 7; | |
var row3 = height / 2; | |
var column1 = 0; | |
var column2 = width / 5; | |
var column3 = width / 2.7; | |
var column4 = width / 1.8; | |
image(keypad, 1000, 0, 150, 800); | |
if (mouseX > column1 && mouseX < column1 + 300 && mouseY > row3 && mouseY < row3 + 300) { | |
image(kidney, column1 + 50, row3, 200, 280); | |
} else { | |
image(chips, column1, row3, 300, 300); | |
}; | |
fill(255); | |
rect(column1 + 125, row3 + 300, 50, 20); | |
fill(0); | |
textSize(16); | |
text("1", column1 + 145, row3 + 303, 50, 20) | |
if (mouseX > column2 && mouseX < column2 + 200 && mouseY > row3 && mouseY < row3 + 300) { | |
image(harvard, column2, row3 + 20, 200, 270); | |
} else { | |
image(fritos, column2, row3 + 20, 200, 270); | |
}; | |
fill(255); | |
rect(column2 + 75, row3 + 300, 50, 20); | |
fill(0); | |
textSize(16); | |
text("2", column2 + 97, row3 + 303, 50, 20) | |
if (mouseX > column3 && mouseX < column3 + 200 && mouseY > row3 && mouseY < row3 + 300) { | |
image(sex_worker, column3, row3, 200, 300); | |
} else { | |
image(pretzel, column3, row3, 200, 300); | |
}; | |
fill(255); | |
rect(column3 + 75, row3 + 300, 50, 20); | |
fill(0); | |
textSize(16); | |
text("3", column3 + 97, row3 + 303, 50, 20) | |
if (mouseX > column4 && mouseX < column4 + 200 && mouseY > row3 && mouseY < row3 + 300) { | |
image(hitman, column4, row3, 150, 300); | |
} else { | |
image(payday, column4, row3, 100, 300); | |
}; | |
fill(255); | |
rect(column4 + 25, row3 + 300, 50, 20); | |
fill(0); | |
textSize(16); | |
text("4", column4 + 47, row3 + 303, 50, 20) | |
if (mouseX > column1 && mouseX < column1 + 400 && mouseY > row1 && mouseY < row1 + 300) { | |
image(tiger, column1 + 20, row1, 350, 200); | |
} else { | |
image(animalCracker, column1 + 20, row1, 350, 200); | |
}; | |
fill(255); | |
rect(column1 + 175, row1 + 210, 50, 20); | |
fill(0); | |
textSize(16); | |
text("5", column1 + 197, row1 + 213, 50, 20) | |
if (mouseX > column2 + 100 && mouseX < column2 + 300 && mouseY > row1 && mouseY < row1 + 300) { | |
image(ak47, column2 + 100, row1 - 150, 150, 400); | |
} else { | |
image(warheads, column2 + 100, row1 - 50, 200, 250); | |
}; | |
fill(255); | |
rect(column2 + 175, row1 + 210, 50, 20); | |
fill(0); | |
textSize(16); | |
text("6", column2 + 197, row1 + 213, 50, 20) | |
if (mouseX > column3 + 100 && mouseX < column3 + 250 && mouseY > row1 && mouseY < row1 + 300) { | |
image(meth, column3 + 75, row1, 150, 200); | |
} else { | |
image(coke, column3 + 100, row1 - 50, 100, 250); | |
}; | |
fill(255); | |
rect(column3 + 125, row1 + 210, 50, 20); | |
fill(0); | |
textSize(16); | |
text("7", column3 + 147, row1 + 213, 50, 20); | |
if (mouseX > column4 && mouseX < column4 + 180 && mouseY > row1 && mouseY < row1 + 300) { | |
image(girls, column4 - 50, row1 - 50, 180, 250); | |
} else { | |
image(sourKids, column4 - 70, row1 - 50, 250, 250); | |
}; | |
fill(255); | |
rect(column4 + 25, row1 + 210, 50, 20); | |
fill(0); | |
textSize(16); | |
text("8", column4 + 47, row1 + 213, 50, 20); | |
//clear button | |
fill(0); | |
rect(1038, 190, 80, 20); | |
fill(255); | |
textFont(myFont); | |
textSize(14); | |
text("Clear Price", 1047, 190, 70, 20); | |
//------------buy button/////////////////// | |
noStroke(); | |
fill(0); | |
rect(width * 0.685, 0.6 * height, 70, 82); | |
fill(random(100, 255), random(100, 200), 50); | |
rect(width * 0.69, height * 0.656, 40, 20); | |
frameRate(20); | |
var t = width * 0.72 + random(-1, 1); | |
var d = width * 0.73 + random(-1, 1); | |
triangle(t, height * 0.6375, d, height * 0.669, t, height * 0.7); | |
push(); | |
fill(random(0, 255)); | |
textSize(22); | |
text("Buy!", width * 0.69, height * 0.61, 100, 20); | |
pop(); | |
fill(random(100, 255), 0, 0); | |
ellipse(width * 0.744, height * 0.675, 12, 12) | |
// //coordinate tracker | |
// fill(255); | |
// text("X: " + mouseX, 10, 20); | |
// text("Y: " + mouseY, 10, 40); | |
///////////////////title page//////////////// | |
noStroke(); | |
fill(0, 0, 0, myOpac); | |
rect(0, 0, width, height); | |
fill(random(0, 255), 0, 255, myOpac); | |
rect(550, 330, 100, 100); | |
if (thiefOn) { | |
image(thief, 550, 330, 100, 100); | |
}; | |
fill(255, 255, 255, fontOpa); | |
textSize(60); | |
textFont(myFont); | |
s = "Hungry?"; | |
text(s, 505, 200, 600, 600); | |
fill(255, 240, 255, fontOpa); | |
textSize(16); | |
p = "Press enter to consume."; | |
text(p, 515, 500, 600, 700); | |
// IF FLAG STATEMENTS//// | |
//kidney | |
if (i_flagOn) { | |
image(i_flag, flagX, flagY, 20, 15); | |
}; | |
if (u_flagOn) { | |
image(u_flag, flagX, flagY + 25, 20, 15); | |
}; | |
if (sa_flagOn) { | |
image(sa_flag, flagX, flagY + 50, 20, 15); | |
}; | |
if (sg_flagOn) { | |
image(sg_flag, flagX, flagY + 75, 20, 15); | |
}; | |
//harvard | |
if (rs_flagOn) { | |
image(rs_flag, flagX, flagY + 100, 20, 15); | |
}; | |
//prostitue | |
if (bn_flagOn) { | |
image(bn_flag, flagX, flagY + 125, 20, 15); | |
}; | |
if (sv_flagOn) { | |
image(sv_flag, flagX, flagY + 150, 20, 20); | |
}; | |
if (bg_flagOn) { | |
image(bg_flag, flagX, flagY + 175, 20, 15); | |
}; | |
if (nd_flagOn) { | |
image(rs_flag, flagX, flagY + 200, 20, 15); | |
}; | |
//hitman | |
if (it_flagOn) { | |
image(it_flag, flagX, flagY + 225, 20, 15); | |
}; | |
if (fr_flagOn) { | |
image(fr_flag, flagX, flagY + 250, 20, 15); | |
}; | |
if (bo_flagOn) { | |
image(bo_flag, flagX, flagY + 275, 20, 15); | |
}; | |
if (mx_flagOn) { | |
image(mx_flag, flagX, flagY + 300, 20, 15); | |
}; | |
//tiger | |
if (dead_flagOn) { | |
image(skin_flag, flagX, flagY + 325, 20, 15); | |
}; | |
if (live_flagOn) { | |
image(skin_flag, flagX, flagY + 350, 20, 15); | |
}; | |
if (penis_flagOn) { | |
image(skin_flag, flagX, flagY + 375, 20, 15); | |
}; | |
if (skin_flagOn) { | |
image(skin_flag, flagX, flagY + 400, 20, 20); | |
}; | |
//ak47 | |
if (iq_flagOn) { | |
image(iq_flag, flagX, flagY + 425, 20, 20); | |
}; | |
if (sd_flagOn) { | |
image(sd_flag, flagX, flagY + 450, 20, 20); | |
}; | |
if (au_flagOn) { | |
image(au_flag, flagX, flagY + 475, 20, 20); | |
}; | |
//meth | |
if (sk_flagOn) { | |
image(sk_flag, flagX, flagY + 500, 20, 20); | |
}; | |
if (gm_flagOn) { | |
image(gm_flag, flagX, flagY + 525, 20, 20); | |
}; | |
if (cm_flagOn) { | |
image(cm_flag, flagX, flagY + 550, 20, 20); | |
}; | |
//girls | |
if (rm_flagOn) { | |
image(rm_flag, flagX, flagY + 575, 20, 20); | |
}; | |
if (ky_flagOn) { | |
image(ky_flag, flagX, flagY + 600, 20, 20); | |
}; | |
if (mz_flagOn) { | |
image(mz_flag, flagX, flagY + 625, 20, 20); | |
}; | |
noStroke(); | |
var pricex = 1030; | |
var pricey = 140; | |
//kidney prices | |
if (israelPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("130,000 US Dollars", pricex, pricey, 100, 100) | |
israel.hide(); | |
i_flagOn = false; | |
}; | |
if (usaPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("120,000 US Dollars", pricex, pricey, 100, 100); | |
usa.hide(); | |
u_flagOn = false; | |
}; | |
if (southAfricaPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("200,000 US Dollars", pricex, pricey, 100, 100); | |
southAfrica.hide(); | |
sa_flagOn = false; | |
}; | |
if (singaporePriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("300,000 US Dollars", pricex, pricey, 100, 100); | |
singapore.hide(); | |
sg_flagOn = false; | |
}; | |
if (russiaPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("40,000 US Dollars", pricex, pricey, 100, 100); | |
russia.hide(); | |
rs_flagOn = false; | |
}; | |
if (bangladeshPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("0.60 US Dollars", pricex, pricey, 100, 100); | |
bangladesh.hide(); | |
bn_flagOn = false; | |
}; | |
if (siliconValleyPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("425 US Dollars", pricex, pricey, 100, 100); | |
siliconValley.hide(); | |
sv_flagOn = false; | |
}; | |
if (bulgariaPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("25 US Dollars", pricex, pricey, 100, 100); | |
bulgaria.hide(); | |
bg_flagOn = false; | |
}; | |
if (netherlandsPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("68 US Dollars", pricex, pricey, 100, 100); | |
netherlands.hide(); | |
nd_flagOn = false; | |
}; | |
//hitman | |
if (italyPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("27,000 US Dollars", pricex, pricey, 100, 100); | |
italy.hide(); | |
it_flagOn = false; | |
}; | |
if (francePriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("330,000 US Dollars", pricex, pricey, 100, 100); | |
france.hide(); | |
fr_flagOn = false; | |
}; | |
if (boliviaPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("9,500 US Dollars", pricex, pricey, 100, 100); | |
bolivia.hide(); | |
bo_flagOn = false; | |
}; | |
if (mexicoPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("85 US Dollars", pricex, pricey, 100, 100); | |
mexico.hide(); | |
mx_flagOn = false; | |
}; | |
//tiger | |
if (deadPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("5,000 US Dollars", pricex, pricey, 100, 100); | |
dead.hide(); | |
dead_flagOn = false; | |
}; | |
if (livePriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("50,000 US Dollars", pricex, pricey, 100, 100); | |
live.hide(); | |
live_flagOn = false; | |
}; | |
if (penisPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("1,300 US Dollars", pricex, pricey, 100, 100); | |
penis.hide(); | |
penis_flagOn = false; | |
}; | |
if (skinPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("1,300 US Dollars", pricex, pricey, 100, 100); | |
skin.hide(); | |
skin_flagOn = false; | |
}; | |
//ak47 | |
if (iraqPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("800 US Dollars", pricex, pricey, 100, 100); | |
iraq.hide(); | |
iq_flagOn = false; | |
}; | |
if (sudanPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("1,300 US Dollars", pricex, pricey, 100, 100); | |
sudan.hide(); | |
sd_flagOn = false; | |
}; | |
if (australiaPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("15,493 US Dollars", pricex, pricey, 100, 100); | |
australia.hide(); | |
au_flagOn = false; | |
}; | |
//meth | |
if (southKoreaPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("562 US Dollars/gram", pricex, pricey, 100, 100); | |
southKorea.hide(); | |
sk_flagOn = false; | |
}; | |
if (germanyPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("89 US Dollars/gram", pricex, pricey, 100, 100); | |
germany.hide(); | |
gm_flagOn = false; | |
}; | |
if (cambodiaPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("1.60 US Dollars/gram", pricex, pricey, 100, 100); | |
cambodia.hide(); | |
cm_flagOn = false; | |
}; | |
//meth | |
if (romaniaPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("4,500 US Dollars", pricex, pricey, 100, 100); | |
romania.hide(); | |
rm_flagOn = false; | |
}; | |
if (kenyaPriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("600 US Dollars", pricex, pricey, 100, 100); | |
kenya.hide(); | |
ky_flagOn = false; | |
}; | |
if (mozambiquePriceOn) { | |
fill(0, 255, 100); | |
textFont(myFont); | |
textSize(20); | |
text("2 US Dollars", pricex, pricey, 100, 100); | |
mozambique.hide(); | |
mz_flagOn = false; | |
}; | |
} | |
// function windowResized() { | |
// resizeCanvas(windowWidth, windowHeight); | |
// } | |
//clear price button. should toggle all prices off | |
function allPriceOff() { | |
israelPriceOn = false; | |
usaPriceOn = false; | |
southAfricaPriceOn = false; | |
singaporePriceOn = false; | |
russiaPriceOn = false; | |
bangladeshPriceOn = false; | |
siliconValleyPriceOn = false; | |
bulgariaPriceOn = false; | |
netherlandsPriceOn = false; | |
italyPriceOn = false; | |
francePriceOn = false; | |
boliviaPriceOn = false; | |
mexicoPriceOn = false; | |
deadPriceOn = false; | |
livePriceOn = false; | |
penisPriceOn = false; | |
skinPriceOn = false; | |
iraqPriceOn = false; | |
sudanPriceOn = false; | |
australiaPriceOn = false; | |
southKoreaPriceOn = false; | |
germanyPriceOn = false; | |
cambodiaPriceOn = false; | |
romaniaPriceOn = false; | |
kenyaPriceOn = false; | |
mozambiquePriceOn = false; | |
} | |
function buyShit() { | |
if (israelPriceOn) { | |
open("http://www.haaretz.com/print-edition/news/two-haifa-men-sentenced-to-jail-for-organ-trafficking-1.235355"); | |
}; | |
if (usaPriceOn) { | |
open("http://latimesblogs.latimes.com/nationnow/2011/10/kidney-broker-pleads-guilty-in-organ-trafficking-case.html"); | |
}; | |
if (southAfricaPriceOn) { | |
open("http://www.telegraph.co.uk/news/worldnews/africaandindianocean/southafrica/8124710/South-African-hospital-pleads-guilty-to-organ-trafficking-case.html"); | |
}; | |
if (singaporePriceOn) { | |
open("http://www.thestandard.com.hk/breaking_news_detail.asp?id=5210"); | |
}; | |
if (russiaPriceOn) { | |
open("http://www.themoscowtimes.com/news/article/fake-diplomas-no-longer-buy-a-university-education/442991.html"); | |
}; | |
if (bangladeshPriceOn) { | |
open("http://www.reuters.com/article/2012/03/19/us-bangladesh-prostitution-idUSBRE82I02A20120319"); | |
}; | |
if (siliconValleyPriceOn) { | |
open("http://money.cnn.com/2013/04/15/technology/silicon-valley-sex-workers/index.html"); | |
}; | |
if (bulgariaPriceOn) { | |
open("http://www.sofiaecho.com/2010/06/18/918421_the-political-economy-of-prostitution"); | |
}; | |
if (netherlandsPriceOn) { | |
open("http://www.theguardian.com/global-development/2013/dec/11/prostitution-netherlands-paying-sex"); | |
}; | |
if (italyPriceOn) { | |
open("http://www.nydailynews.com/news/world/mafia-hitman-tells-charged-attacks-murders-article-1.2140866"); | |
}; | |
if (francePriceOn) { | |
open("http://timesofindia.indiatimes.com/world/europe/Son-in-law-charged-with-contract-killing-of-Monaco-heiress/articleshow/37338629.cms"); | |
}; | |
if (boliviaPriceOn) { | |
open("http://www.nytimes.com/2013/05/03/world/americas/killing-puts-spotlight-on-bolivian-drugs-and-crime.html?hp&_r=1&pagewanted=all"); | |
}; | |
if (mexicoPriceOn) { | |
open("https://en.wikipedia.org/wiki/El_Narco:_Inside_Mexico%27s_Criminal_Insurgency"); | |
}; | |
if (livePriceOn || skinPriceOn) { | |
open("http://news.mongabay.com/2010/06/plight-of-the-bengal-india-awakens-to-the-reality-of-its-tigers-and-their-fate/"); | |
}; | |
if (deadPriceOn) { | |
open("http://e360.yale.edu/content/feature.msp?id=2126"); | |
}; | |
if (penisPriceOn) { | |
open("http://www.bangkokpost.com/archive/wildlife-smuggling-trails-go-ever-deeper/244127"); | |
}; | |
if (iraqPriceOn) { | |
open("http://www.nytimes.com/2006/12/10/world/middleeast/10weapons.html"); | |
}; | |
if (sudanPriceOn) { | |
open("http://isites.harvard.edu/fs/docs/icb.topic1498727.files/Skinner_Ch3.pdf"); | |
}; | |
if (australiaPriceOn) { | |
open("http://www.theaustralian.com.au/news/nation/gun-smuggling-linked-to-criminal-gangs/story-e6frg6nf-1226499388180"); | |
}; | |
if (southKoreaPriceOn) { | |
open("https://www.unodc.org/documents/wdr2015/World_Drug_Report_2015.pdf"); | |
}; | |
if (germanyPriceOn) { | |
open("http://www.dw.com/en/politicians-aim-to-end-spread-of-crystal-meth/a-16600854"); | |
}; | |
if (cambodiaPriceOn) { | |
open("http://www.phnompenhpost.com/national/meth-use-rise-kingdom"); | |
}; | |
if (romaniaPriceOn) { | |
open("http://www.amazon.com/Human-Trafficking-Prices-Statistics-Modern-ebook/dp/B00Z942AQE/ref=as_li_ss_tl?ie=UTF8&qid=1441619571&sr=8-22&keywords=human+trafficking&linkCode=sl1&tag=leadershipcs-20&linkId=c95d33c52308435c8d380b54c7a173ba"); | |
}; | |
if (kenyaPriceOn) { | |
open("http://www.nation.co.ke/news/Kenya-lands-on-US-human-trafficking-list/-/1056/2888148/-/wvdqmy/-/index.html"); | |
}; | |
if (mozambiquePriceOn) { | |
open("http://thecnnfreedomproject.blogs.cnn.com/2012/02/20/trafficking-in-mozambique-every-minute-was-the-worst/"); | |
}; | |
} | |
function keyPressed() { | |
if (keyCode === ENTER) { | |
fontOpa = 0; | |
rectOpa = 0; | |
myOpac = 0; | |
thiefOn = false; | |
shopping.play(); | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment