1 / 7

Jeu de role interactif

Jeu de role interactif. Enora GABORY. Axel MANGUY. I - construction de la démarche et mise en œuvre des moyens. Cahier des charges. II- La réalisation dans son essence Algorithmique. déplacement via gestion de l’accéléromètre Android. import ketai.sensors .*; KetaiSensor sensor ;

loki
Télécharger la présentation

Jeu de role interactif

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Jeu de role interactif Enora GABORY Axel MANGUY

  2. I - construction de la démarche et mise en œuvre des moyens • Cahier des charges

  3. II- La réalisation dans son essence Algorithmique • déplacement via gestion de l’accéléromètre Android import ketai.sensors.*; KetaiSensorsensor; floataccelerometerX, accelerometerY, accelerometerZ; void setup() { sensor = new KetaiSensor(this); sensor.start(); orientation(LANDSCAPE); textAlign(CENTER, CENTER); textSize(36); } voiddraw() { background(78, 93, 75); if(testaccelerometer(-1,1,1,2)) { text("Avant"); } if(testaccelerometer(-1,1,2,10)) { text("VraimentAvant"); } booleantestaccelerometer (float a, float b, float c, float d) { if((accelerometerX > a) && (accelerometerX < b) && (accelerometerY > c) && (accelerometerY < d)) { return true; } else { return false; } }

  4. II- La réalisation dans son essence Algorithmique • Déplacement par sélection spécifique Avancer Ramasser intrectX, rectY; int rect2X, rect2Y; intrectSize = 100 int rect2Size = 100; colorrectColor, baseColor, color1, color2 booleanrectOver = false; boolean rect2Over = false; void setup() { size(1000, 600); rectColor = color(#5B3B11); baseColor = color(102); rect2X = width/2+rect2Size/2+10; rect2Y = height-height/4; rectX = width/2-rectSize-10; rectY = height-height/4; } void mousePressed() //aplication/ modifcation de variable { if (overRect(rectX, rectY, rectSize, rectSize)) { baseColor = color1; } if (overRect(rect2X, rect2Y, rect2Size, rect2Size)) { baseColor = color2; } }

  5. II- La réalisation dans son essence Algorithmique • Programmation des constituantes spécifiques de l’arbre. if(testrect(50,156,100,34)) { p1=true; fill(#00FF00); rect(10,10,10,10); fill(#FFFFFF); } void setup() { size(200, 200); background(#000000); noStroke(); b = loadImage("allumete.gif"); c = loadImage("feu.jpg"); } voiddraw() { background(#000000); image(b, mouseX, mouseY); fill(#FFFFFF); booleantestrect(int x, int y, int lx, intly) { if( (x<mouseX && mouseX<x+lx) && (y<mouseY && mouseY<y+ly)) { return true; } else { return false; } }

  6. III- Universalisation du code • Adaptabilité aux différents environnements Android void setup() { size(200, 200); background(#000000); noStroke(); b = loadImage("allumete.gif"); c = loadImage("feu.jpg"); } voiddraw() { background(#000000); image(b, mouseX, mouseY); fill(#FFFFFF); if(testrect(50,156,100,34)) { p1=true; fill(#00FF00); rect(10,10,10,10); fill(#FFFFFF); }

  7. III-Adéquation avec le cahier des charges

More Related