Team:TU Eindhoven/the game

From 2014.igem.org

(Difference between revisions)
Line 175: Line 175:
void setup() {
void setup() {
   size(640, 360);
   size(640, 360);
 +
  //size(1000, 800);
 +
  textAlign(CENTER);
 +
  //image's
 +
 +
  level1_1  = loadImage("http://i.imgur.com/V6756WQ.png");
 +
  level1_2  = loadImage("http://i.imgur.com/qmz6Tqx.png");
 +
  level1_3  = loadImage("http://i.imgur.com/kTG3cjw.png");
 +
  level2_1  = loadImage("http://i.imgur.com/rXLfh0n.png");
 +
  level2_2  = loadImage("http://i.imgur.com/DF3iOQN.png");
 +
  wellDone  = loadImage("http://i.imgur.com/P5kUXSf.png");
 +
  toBad  = loadImage("http://i.imgur.com/G7MdUHm.png");
 +
  logo1_1  = loadImage("http://i.imgur.com/qiWx2fF.png");
 +
  logo1_2  = loadImage("http://i.imgur.com/2YUI7lW.png");
 +
  logo1_3  = loadImage("http://i.imgur.com/KQ0ZyBA.png");
 +
  logo2_1  = loadImage("http://i.imgur.com/EKrOZM8.png");
 +
  logo2_2  = loadImage("http://i.imgur.com/8VAJ6Bt.png");
 +
  logo1_max  = loadImage("http://i.imgur.com/ermi0iK.png");
 +
  logo2_max  = loadImage("http://i.imgur.com/t2kTiPr.png");
 +
 
 +
  helpOn = loadImage("http://i.imgur.com/oqpG7r6.png");
 +
  helpOff = loadImage("http://i.imgur.com/yt3xRrC.png");
 +
 
 +
  handInDNA = loadImage("http://i.imgur.com/HsgqFiR.png");
 +
  info = loadImage("http://i.imgur.com/87sB8SH.png");
 +
  background = loadImage("http://i.imgur.com/wrpjZ1g.png");
 +
 
 +
  img_gfp = loadImage("http://i.imgur.com/klMOhVr.png");
 +
  img_t7 = loadImage("http://i.imgur.com/CfREnca.png");
 +
  img_terminator = loadImage("http://i.imgur.com/1Sk2HSE.png");
 +
  img_antibiores = loadImage("http://i.imgur.com/wyzfNAg.jpg");
 +
  img_tntP = loadImage("http://i.imgur.com/ymhoulY.png");
 +
  img_o2 = loadImage("http://i.imgur.com/oW2kyrW.png");
 +
  img_display = loadImage("http://i.imgur.com/DF3iOQN.png");
 +
  img_linker = loadImage("http://i.imgur.com/UmJRy3m.png");
 +
  img_mri = loadImage("http://i.imgur.com/nkWwyFH.png");
 +
  img_keke = loadImage("http://i.imgur.com/EY7xXur.png");
 +
  img_inhi = loadImage("http://i.imgur.com/i9jxTsO.png");
 +
  binOn = loadImage("http://i.imgur.com/gDccyRX.png");
 +
  binOff = loadImage("http://i.imgur.com/oi4cINP.png");
 +
 
 +
  numberOfDNA = 11;
 +
  infoBoard = new PImage[numberOfDNA + 1];
 +
  infoBoard[1] = loadImage("http://i.imgur.com/vWEOnlj.png");
 +
  infoBoard[2] = loadImage("http://i.imgur.com/sua0hIH.png");
 +
  infoBoard[3] = loadImage("http://i.imgur.com/o2V20If.png");
 +
  infoBoard[4] = loadImage("http://i.imgur.com/V2v8JpM.png");
 +
  infoBoard[5] = loadImage("http://i.imgur.com/7VmOmW1.png");
 +
  infoBoard[6] = loadImage("http://i.imgur.com/NW22Blc.png");
 +
  infoBoard[7] = loadImage("http://i.imgur.com/9uJagVU.png");
 +
  infoBoard[8] = loadImage("http://i.imgur.com/C7xi9eF.png");
 +
  infoBoard[9] = loadImage("http://i.imgur.com/V8Tyv9D.png");
 +
  infoBoard[10] = loadImage("http://i.imgur.com/14eMBR8.png");
 +
  infoBoard[11] = loadImage("http://i.imgur.com/rKe6hVf.png");
 +
 
 +
  helpScreen = new PImage[maxNumberOfHelpScreens];
 +
  helpScreen[0] = loadImage("http://i.imgur.com/tVs8PA3.png");
 +
  helpScreen[1] = loadImage("http://i.imgur.com/8TgXchE.png");
 +
  helpScreen[2] = loadImage("http://i.imgur.com/k2JxEjl.png");
 +
 
 +
  //grapping items
 +
 +
 
 +
  dna = new DNAPiece[numberOfDNA + 1];
 +
  dna[0] = new DNAPiece(10, 10, img_gfp, name_gfp, 1, color(0, 255, 0));
 +
  dna[1] = new DNAPiece(10, 80, img_terminator, name_terminator, 2, color(200,200,200));
 +
  dna[2] = new DNAPiece(10, 150, img_t7, name_t7, 3, color(255,0,100));
 +
  dna[3] = new DNAPiece(10, 220, img_antibiores, name_antibiores, 4, color(255,255,255));
 +
  dna[4] = new DNAPiece(10, 290, img_tntP, name_tntP, 5, color(255,100,0));
 +
  dna[5] = new DNAPiece(10, 360, img_o2, name_o2, 6, color(255, 0, 0));
 +
  dna[6] = new DNAPiece(10, 430, img_display, name_display, 7, color(100,51,102));
 +
  dna[7] = new DNAPiece(10, 500, img_linker, name_linker, 8, color(0,105,106));
 +
  dna[8] = new DNAPiece(10, 570, img_mri, name_mri, 9, color(255,125,255));
 +
  dna[9] = new DNAPiece(10, 640, img_keke, name_keke, 10, color(255,0,255));
 +
  dna[10] = new DNAPiece(10, 710, img_inhi, name_inhi, 11, color(100,100,255));
 +
  plasmide1 = new Plasmide(250, 100, 500, 450, 2);
 +
  plasmide2 = new Plasmide(350, 425, 350, 300, 2);
 +
 
 +
  //buttons right
 +
  bin = new Button((width-stripRight)+10, 20, binOn, binOff);
 +
  helpButton = new Button((width-stripRight)+10, 700, helpOn, helpOff);
 +
  helpButton.isItOn = true;
 +
 
 +
  //levels
 +
 +
  level1 = new SubLevel[3];
 +
  level2 = new SubLevel[1];
 +
  level1[0] = new SubLevel(eis1_1,empty, logo1_1, level1_1, wellDone, 1, 1);
 +
  level1[1] = new SubLevel(eis1_2,empty, logo1_2, level1_2, wellDone, 1, 2);
 +
  level1[2] = new SubLevel(eis1_3,empty, logo1_3, level1_3, wellDone, 1, 2);
 +
  level2[0] = new SubLevel(eis2_1,empty, logo2_1, level2_1, wellDone, 2, 1);
 +
  //level2[1] = new SubLevel(eis2_2,empty, logo2_2, level2_2, wellDone, 2, 2);
 +
 
 +
 +
  theRealLevels = new MasterLevel[2];
 +
  theRealLevels[0] = new MasterLevel(level1, toBad, logo1_max, (width-stripRight)+10, 100);
 +
  theRealLevels[1] = new MasterLevel(level2, toBad, logo2_max, (width-stripRight)+10, 180);
 +
 
   // The image file must be in the data folder of the current sketch  
   // The image file must be in the data folder of the current sketch  
   // to load successfully
   // to load successfully

Revision as of 14:21, 17 July 2014

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Clock \ Examples \ Processing.org

 

AAAAAAAA