-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindow.pde
More file actions
executable file
·43 lines (32 loc) · 1.05 KB
/
Copy pathWindow.pde
File metadata and controls
executable file
·43 lines (32 loc) · 1.05 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
class Window implements Drawable{
int left, right, top, bottom;
int score = 0;
public Window(int left, int right, int top, int bottom){
this.left = left;
this.right = right;
this.top = top;
this.bottom = bottom;
}
public void draw(){
//This makes the overlay for everything else.
textSize(15);
fill(200, 60, 140);
noStroke();
rectMode(CORNER);
rect(0, 0, left, height);
rect(left, 0, right, top);
rect(right, 0, width, height);
rect(left, bottom, right, height);
//List the score here.
fill(0, 0, 0);
textAlign(LEFT, TOP);
text("Score: " + score, 400, 50);
text("Time: " + nf(((manager.currentTime - manager.startTime)/1000f), 1, 3) + "s", 400, 100);
fill(0);
textAlign(LEFT, BOTTOM);
text("Esc to Pause", 5, height-5);
}
void reset(){
score = 0;
}
}