class Character{ int x, y; int MINIMUM = 20; PImage body; PImage shirt; PImage item; PImage hat; PImage hands; boolean hasShirt = false; boolean hasItem = false; boolean hasHat = false; boolean hasHands = false; int theArray[] = new int[7]; Character(int ix, int iy){ x = ix; y = iy; loadPics(); }//end constrctor void paint(){ image(body, x, y); if(hasShirt) image(shirt, x, y); if(hasItem) image(item, x, y); if(hasHat) image(hat, x, y); //if(hasHands) image(hands, x, y); }//end paint void loadPics(){ body = loadImage("body.png"); theArray[0] = dtechnologyScore; theArray[1] = dscienceScore; theArray[2] = dworldScore; theArray[3] = dsportsScore; theArray[4] = dvideosScore; theArray[5] = dentertainmentScore; theArray[6] = dgamingScore; quickSort(theArray, 7); println(theArray); //check to see if you need to load all this shit //shirt if(theArray[6] >= MINIMUM) { loadShirt(); hasShirt = true; } else { hasShirt = false; }//end else //Item if(theArray[5] >= MINIMUM) { loadItem(); hasItem = true; } else { hasItem = false; }//end else //Hat if(theArray[4] >= MINIMUM) { loadHat(); hasHat = true; } else { hasHat = false; }//end else //Hands if(theArray[3] >= MINIMUM) { //loadHands(); hasHands = true; } else { hasHands = false; }//end else }//end void loadShirt(){ if(theArray[6] == dtechnologyScore) shirt=loadImage("techShirt.png"); if(theArray[6] == dscienceScore) shirt=loadImage("scienceShirt.png"); if(theArray[6] == dworldScore) shirt=loadImage("worldShirt.png"); if(theArray[6] == dsportsScore) shirt=loadImage("sportsShirt.png"); if(theArray[6] == dvideosScore) shirt=loadImage("videosShirt.png"); if(theArray[6] == dentertainmentScore) shirt=loadImage("entertainmentShirt.png"); if(theArray[6] == dgamingScore) shirt=loadImage("gamingShirt.png"); }//end load shirt void loadItem(){ if(theArray[5] == dtechnologyScore) item=loadImage("techItem.png"); if(theArray[5] == dscienceScore) item=loadImage("scienceItem.png"); if(theArray[5] == dworldScore) item=loadImage("worldItem.png"); if(theArray[5] == dsportsScore) item=loadImage("sportsItem.png"); if(theArray[5] == dvideosScore) item=loadImage("videosItem.png"); if(theArray[5] == dentertainmentScore) item=loadImage("entertainmentItem.png"); if(theArray[5] == dgamingScore) item=loadImage("gamingItem.png"); }//end load item void loadHat(){ if(theArray[4] == dtechnologyScore) hat=loadImage("techHat.png"); if(theArray[4] == dscienceScore) hat=loadImage("scienceHat.png"); if(theArray[4] == dworldScore) hat=loadImage("worldHat.png"); if(theArray[4] == dsportsScore) hat=loadImage("sportsHat.png"); if(theArray[4] == dvideosScore) hat=loadImage("videosHat.png"); if(theArray[4] == dentertainmentScore) hat=loadImage("entertainmentHat.png"); if(theArray[4] == dgamingScore) hat=loadImage("gamingHat.png"); }//end load hat void loadHands(){ if(theArray[3] == dtechnologyScore) hands=loadImage("techHands.png"); if(theArray[3] == dscienceScore) hands=loadImage("scienceHands.png"); if(theArray[3] == dworldScore) hands=loadImage("worldHands.png"); if(theArray[3] == dsportsScore) hands=loadImage("sportsHands.png"); if(theArray[3] == dvideosScore) hands=loadImage("videosHands.png"); if(theArray[3] == dentertainmentScore) hands=loadImage("entertainmentHands.png"); if(theArray[3] == dgamingScore) hands=loadImage("gamingHands.png"); }//end load hands /** * boolean is1high(int n){ * * }//end is 1high * * boolean is2high(int n){ * * }//end is 2high * * boolean is3high(int n){ * * }//end is 3 high */ }//end class characterrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr