-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy paths_standard.pde
More file actions
50 lines (48 loc) · 1.83 KB
/
Copy paths_standard.pde
File metadata and controls
50 lines (48 loc) · 1.83 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
ArrayList<Circle> queue = new ArrayList<Circle>(); // Queue of circles to draw every frameơ
int comboc = 1; // The current hit object combo
int count = 0; // Counter of how many circles displayed
int time;
int timedebug;
void standardScreen() {
time = millis() - timem; // The current time since starting the song
Circle circle = circles.get(count); // Retrieve the circle info from the Array
// Remove the circle from the queue once playing time > circle.time
for (int i = 0; i < queue.size(); i++) {
if (time >= queue.get(i).time) {
queue.remove(i);
}
}
// If the current time ran is above the time of the circle then display it
if ((time >= circle.time - ar - 150 /* time for the circle to fade in */)) {
if ((circle.type == 2) || ((circle.type >= 4) && (circle.type <= 6))) {
comboc = 1;
}
circle.combo = comboc; // update the circle combo counter with the current combo
queue.add(circle); // Add the circle to the queue for later displaying
// check for new combo from the type of the circle
count++; comboc++; //update the combo
if (count >= counter) {
clear(); // f_clear.pde
}
}
// run through circles in the queue
for (int i = 0; i < queue.size(); i++) {
Circle obj = queue.get(i);
drawobj(obj);
int clicc = click(obj, time);
if (clicked) {
switch (clicc) {
// f_input.pde
// click(Circle, int) returns the score when clicked (300, 100, 50, 0)
case -1:
break;
default:
queue.remove(i);
//draw the correct score
image(hit[clicc], obj.x, obj.y);
break;
}
}
clicked = false;
}
}