forked from AP4012/DodgeUp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHuman.java
More file actions
72 lines (64 loc) · 2.51 KB
/
Human.java
File metadata and controls
72 lines (64 loc) · 2.51 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import processing.core.PApplet;
import processing.core.PImage;
public class Human implements HumanInterface{
private float humanHeadWidth;
private float humanHeight;
private float humanColorR;
private float humanColorG;
private float humanColorB;
private static PApplet a = Main.processing;
private static PImage sm;
public Human(float humanHeadWidth, float humanHeight, float humanColorR, float humanColorG, float humanColorB) {
this.humanHeadWidth = humanHeadWidth;
this.humanHeight = humanHeight;
this.humanColorR = humanColorR;
this.humanColorG = humanColorG;
this.humanColorB = humanColorB;
}
public void makeAndShowObjects(){
a.fill(humanColorR, humanColorG, humanColorB);
a.noStroke();
a.fill(242, 241, 230);
a.circle(humanHeadWidth, 567, 22);
a.fill(0);
a.circle(humanHeadWidth - 5, 564, 5);
a.fill(0);
a.circle(humanHeadWidth + 5, 564, 5);
a.stroke(0);
a.strokeWeight(3);
a.line(humanHeadWidth - 6, 570, humanHeadWidth + 5, 570);
a.noStroke();
a.fill(214, 31, 21);
a.rect(humanHeadWidth - 10, 577, 20, 22);
a.stroke(0);
a.strokeWeight(4);
a.line(humanHeadWidth + 11, 578, humanHeadWidth + 11, 595);
a.line(humanHeadWidth - 12, 578, humanHeadWidth - 12, 595);
a.stroke(0);
a.line(humanHeadWidth - 5, 600, humanHeadWidth - 5, 615);
a.line(humanHeadWidth + 5, 600, humanHeadWidth + 5, 615);
// a.line(humanHeadWidth + 15, 610, humanHeadWidth + 5, 615);
a.stroke(242, 241, 160);
a.strokeWeight(20);
a.line(0, 620, 400, 620);
}
public void showWhenCrashed(){
a.fill(humanColorR, humanColorG, humanColorB);
a.noStroke();
a.fill(242, 241, 230);
a.circle(humanHeadWidth, 570, 16);
a.fill(214, 31, 21);
a.rect(humanHeadWidth - 10, 577, 20, 22);
a.stroke(0);
a.strokeWeight(4);
a.line(humanHeadWidth + 11, 578, humanHeadWidth + 11, 595);
a.line(humanHeadWidth - 12, 578, humanHeadWidth - 12, 595);
a.stroke(0);
a.line(humanHeadWidth - 5, 600, humanHeadWidth - 5, 615);
a.line(humanHeadWidth + 5, 600, humanHeadWidth + 5, 615);
// a.line(humanHeadWidth + 15, 610, humanHeadWidth + 5, 615);
a.stroke(245, 5, 17);
a.strokeWeight(20);
a.line(0, 620, 400, 620);
}
}