-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.java
More file actions
60 lines (47 loc) · 1.26 KB
/
Game.java
File metadata and controls
60 lines (47 loc) · 1.26 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
51
52
53
54
55
56
57
58
59
60
public class Game {
private Player player;
private MovementController movementController;
private Level level;
private int tickRate;
private double sensitivity;
private int renderDistance;
public Game() {
this.player = new Player(
new Camera(new Vector3(0, 80 + 0.95 * 1.8, 0),
(double) GameFrame.getInstance().WIDTH / (double) GameFrame.getInstance().HEIGHT),
0.8,
1.8, 1, 1,
5);
this.tickRate = 20;
this.sensitivity = 0.01;
this.renderDistance = 2;
this.movementController = new MovementController(this);
this.level = new Level(this);
}
public Game(String filePath) {
this.player = loadPlayer(filePath);
this.tickRate = 20;
this.sensitivity = 0.01;
this.renderDistance = 4;
this.movementController = new MovementController(this);
this.level = new Level(this, filePath);
}
public Player loadPlayer(String filePath) {
return null;
}
public Player getPlayer() {
return player;
}
public MovementController getMovementController() {
return movementController;
}
public Level getLevel() {
return level;
}
public double getSensitivity() {
return sensitivity;
}
public int getRenderDistance() {
return renderDistance;
}
}