Skip to content
Extraits de code Groupes Projets
Valider ecd7d890 rédigé par Quentin CECCONI's avatar Quentin CECCONI
Parcourir les fichiers

Replace arc_test.pde

parent 476d2a9b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
void setup(){
size(720,1080);
size(displayWidth,displayHeight);
background(0,0,0);
stroke(255,0,0);
noFill();
......@@ -22,16 +22,18 @@ void slash(float a,float b,float c,float d,color col,float offset,float lastcomp
void mousePressed(){
is_slash = true;
comp = 0;
points = points + 1;
}
float comp = 0;
float lastcomp = 0;
float a = random(100,400);
float b = random(100,400);
float c = random(250,300);
float d = random(500,1000);
float a = random(100,displayWidth);
float b = random(100,displayHeight);
float c = random(250,displayWidth);
float d = random(500,displayHeight);
float offset = random(0,2*PI);
boolean is_slash = false;
int points = 0;
void draw() {
if (is_slash == true){
......@@ -45,12 +47,13 @@ void draw() {
comp = comp + PI/20;
if (comp > PI){
clear();
textSize(32);
text("X"+str(points),100,100);
a = random(100,400);
b = random(100,400);
c = random(250,300);
d =random(500,1000);
a = random(100,displayWidth - displayWidth/10);
b = random(100,displayHeight - displayHeight/10);
c = random(250,displayWidth-displayHeight/5);
d =random(500,displayHeight-displayHeight/5);
offset = random(0,2*PI);
is_slash =false;
comp = 0;}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter