add comments
parent
f88dd6f1d8
commit
2e86f46778
|
@ -44,19 +44,21 @@ public class Litecraft extends Game
|
||||||
{
|
{
|
||||||
Litecraft.INSTANCE = this;
|
Litecraft.INSTANCE = this;
|
||||||
dbgStats = new Vector4i();
|
dbgStats = new Vector4i();
|
||||||
Constants.movementSpeed = 0.5f;
|
// set constants
|
||||||
Constants.turnSpeed = 0.00006f;
|
Constants.movementSpeed = 0.5f; // movement speed
|
||||||
Constants.gravity = new org.joml.Vector3f(0, -0.0000000005f, 0);
|
Constants.turnSpeed = 0.00006f; // turn speed
|
||||||
Constants.jumpPower = 0.00005f;
|
Constants.gravity = new Vector3f(0, -0.0000000005f, 0); // compute gravity as a vec3f
|
||||||
Window.create(1200, 800, "LiteCraft", 60);
|
Constants.jumpPower = 0.00005f; // jump power
|
||||||
KeyCallbackHandler.trackWindow(Window.window);
|
Window.create(1200, 800, "LiteCraft", 60); // create window
|
||||||
|
KeyCallbackHandler.trackWindow(Window.window); // set up the gateways keybind key tracking
|
||||||
MouseCallbackHandler.trackWindow(Window.window);
|
MouseCallbackHandler.trackWindow(Window.window);
|
||||||
setupKeybinds();
|
setupKeybinds(); // set up keybind
|
||||||
@SuppressWarnings("unused") Block b = Blocks.AIR; // make sure blocks are initialised
|
@SuppressWarnings("unused") Block b = Blocks.AIR; // make sure blocks are initialised
|
||||||
GingerUtils.init();
|
GingerUtils.init(); // set up ginger utilities
|
||||||
Window.setBackgroundColour(0.2f, 0.2f, 0.6f);
|
Window.setBackgroundColour(0.2f, 0.2f, 0.6f); // set the window refresh colour
|
||||||
TexturedModel dirtModel = ModelLoader.loadGenericCube("block/cubes/stone/brick/stonebrick.png");
|
TexturedModel dirtModel = ModelLoader.loadGenericCube("block/cubes/stone/brick/stonebrick.png");
|
||||||
StaticCube.scaleCube(1f);
|
StaticCube.scaleCube(1f);
|
||||||
|
// set up Ginger3D stuff
|
||||||
this.player = new Player(dirtModel, new Vector3f(0, 0, -3), 0, 180f, 0, new Vector3f(0.2f, 0.2f, 0.2f));
|
this.player = new Player(dirtModel, new Vector3f(0, 0, -3), 0, 180f, 0, new Vector3f(0.2f, 0.2f, 0.2f));
|
||||||
this.camera = new FirstPersonCamera(player);
|
this.camera = new FirstPersonCamera(player);
|
||||||
this.player.isVisible = false;
|
this.player.isVisible = false;
|
||||||
|
|
Loading…
Reference in New Issue