-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathasteroids.pde
68 lines (53 loc) · 1.29 KB
/
asteroids.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
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
/* OpenProcessing Tweak of *@*http://www.openprocessing.org/sketch/1129*@* */
/* !do not delete the line above, required for linking your tweak if you upload again */
import java.awt.Point;
import java.awt.Polygon;
import java.awt.Rectangle;
import java.awt.Dimension;
import java.util.List;
import java.util.LinkedList;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.ListIterator;
import ddf.minim.*;
Minim minim;
AudioPlayer player;
boolean noSound = false;
boolean noHit = false;
void setup() {
size(800,675);
frame.setResizable(true);
frameRate(30);
smooth();
fontA = loadFont("CourierNew36.vlw");
minim = new Minim(this);
sounds = new Sounds();
game = new Game();
game.init(true);
println("Game Started");
println("Size = (" + width + ", " + height + ")");
}
void draw() {
frame.setSize(800,675);
try {
game.draw();
}
catch (Exception e) {
e.printStackTrace();
}
}
void keyPressed() {
game.controller.keyPressed();
}
void keyReleased() {
game.controller.keyReleased();
}
void mousePressed() {
game.controller.mousePressed();
}
Game game = null;
PFont fontA;
Sounds sounds;
public final int EXPLODE_BIG = 2;
public final int EXPLODE_MEDIUM = 1;
public final int EXPLODE_SMALL = 0;