-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
Debug.java
32 lines (26 loc) · 892 Bytes
/
Debug.java
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
import javax.swing.*;
/** Debugging options for Doom.*/
public abstract class Debug {
static private JCheckBox showRaysBox = new JCheckBox("Show rays");
static private JCheckBox showMapBox = new JCheckBox("Show map");
static private JCheckBox oneRayBox = new JCheckBox("One ray");
static public void createControls(Game g) {
showMapBox.setSelected(true);
showRaysBox.setSelected(false);
oneRayBox.setSelected(false);
g.addControl(showMapBox);
g.addControl(showRaysBox);
g.addControl(oneRayBox);
}
/** Show rays in map */
static boolean getShowRays() {
return showRaysBox.isSelected();
}
static boolean getShowMap() {
return showMapBox.isSelected();
}
/** True if only one ray should be cast. */
static boolean getOneRay() {
return oneRayBox.isSelected();
}
}