forked from argonautcode/animal-proc-anim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProcAnim.pde
42 lines (34 loc) · 618 Bytes
/
ProcAnim.pde
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
import processing.javafx.*;
Fish fish;
Snake snake;
Lizard lizard;
int animal;
void setup() {
fullScreen(FX2D);
fish = new Fish(new PVector(width/2, height/2));
snake = new Snake(new PVector(width/2, height/2));
lizard = new Lizard(new PVector(width/2, height/2));
animal = 0;
}
void draw() {
background(40, 44, 52);
switch (animal) {
case 0:
fish.resolve();
fish.display();
break;
case 1:
snake.resolve();
snake.display();
break;
case 2:
lizard.resolve();
lizard.display();
break;
}
}
void mousePressed() {
if (++animal > 2) {
animal = 0;
}
}