-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUmbrellaBack.pde
More file actions
39 lines (34 loc) · 781 Bytes
/
UmbrellaBack.pde
File metadata and controls
39 lines (34 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class UmbrellaBack{
PVector initLoc;
PVector velocity;
int state;
boolean up;
UmbrellaBack(PVector l){
initLoc = l;
velocity = new PVector(0, 1);
state = 0;
up = false;
}
void run(){
update();
drawUmbrella();
}
void update(){
initLoc.x = mouseX;
initLoc.y = mouseY;
}
void drawUmbrella(){
fill(#b5f3f7);
arc(initLoc.x, initLoc.y, 100, 80, PI, 2*PI);
rect(initLoc.x-7, initLoc.y, 5, 35);
noFill();
stroke(#54dfe8);
strokeWeight(5);
arc(initLoc.x-15, initLoc.y+31, 20, 20, 0, PI);
noStroke();
fill(#54dfe8);
triangle(initLoc.x+4, initLoc.y-38, initLoc.x-6, initLoc.y-38, initLoc.x-1, initLoc.y-48);
noStroke();
noFill();
}
}