Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int couleur;
- int blue = #0000FF ;
- int vert = #00FF00 ;
- int jaune = #FFFF00 ;
- boolean b = true ;
- boolean v = false ;
- boolean j = false ;
- void setup() {
- background(#FFFFFF);
- size(120,100);
- }
- void draw(){
- if (b==true && j==false && v ==false ) { couleur = blue ; }
- if (j==true && b==false && v ==false ) { couleur = jaune ; }
- if (v==true && j==false && b ==false ) { couleur = vert ; }
- fill(couleur);
- ellipse(56, 46, 55, 55);
- }
- void mouseClicked(){
- if (couleur==blue ) {
- b=false ;
- v=true ;
- j=false ;
- }
- if (couleur==vert) {
- v=false ;
- j=true ;
- b=false ;
- }
- if (couleur==jaune) {
- v=false ;
- b=true ;
- j=false ;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement