why doesnt anything work?
in
Programming Questions
•
28 days ago
So i was just was doing simple homework and i deleted the LAST block of code for a mouse click and now nothing works can someone tell me what happened?
- void setup() {
- size(400,400);
- background(0); //black
- }
- void keyPressed() {
- if(key==CODED){
- if(keyCode == UP)
- background(0,0,255);//blue
- if(keyCode == DOWN)
- background(255);//white
- if(keyCode == LEFT)
- background(255,0,0);//red
- if(keyCode == RIGHT)
- background(0,255,0);//red
- if(keyCode == ENTER)
- background(0);//back to black
- }
- }
- void mousePressed() {
- if(true); {
- stroke(0); //body1 stroke
- fill(0,0,255); //body1 fill
- rectMode(CORNERS);
- rect(50,200,100,325); //body1
- ellipseMode(CENTER);
- stroke(0); //head stroke
- ellipse(75,190,80,80); //head1
- fill(255,127,0); //eye fill
- ellipse(62.5,180,20,40); //eye 1 of 1
- ellipse(87.5,180,20,40); //eye 2 of 1
- stroke(0);
- fill(255,0,0);
- ellipse(75,325,75,15); //hoverpad
- stroke(0);
- line(50,250,25,200); //arm 1 of 1
- line(100,250,125,200); //arm 2 of 1
- line(62.5,215,87.5,215); //mouth
- }
- }
1