add comments

pull/12/head
valoeghese 2020-02-28 17:17:01 +13:00
parent f88dd6f1d8
commit 2e86f46778
1 changed files with 11 additions and 9 deletions

View File

@ -44,19 +44,21 @@ public class Litecraft extends Game
{
Litecraft.INSTANCE = this;
dbgStats = new Vector4i();
Constants.movementSpeed = 0.5f;
Constants.turnSpeed = 0.00006f;
Constants.gravity = new org.joml.Vector3f(0, -0.0000000005f, 0);
Constants.jumpPower = 0.00005f;
Window.create(1200, 800, "LiteCraft", 60);
KeyCallbackHandler.trackWindow(Window.window);
// set constants
Constants.movementSpeed = 0.5f; // movement speed
Constants.turnSpeed = 0.00006f; // turn speed
Constants.gravity = new Vector3f(0, -0.0000000005f, 0); // compute gravity as a vec3f
Constants.jumpPower = 0.00005f; // jump power
Window.create(1200, 800, "LiteCraft", 60); // create window
KeyCallbackHandler.trackWindow(Window.window); // set up the gateways keybind key tracking
MouseCallbackHandler.trackWindow(Window.window);
setupKeybinds();
setupKeybinds(); // set up keybind
@SuppressWarnings("unused") Block b = Blocks.AIR; // make sure blocks are initialised
GingerUtils.init();
Window.setBackgroundColour(0.2f, 0.2f, 0.6f);
GingerUtils.init(); // set up ginger utilities
Window.setBackgroundColour(0.2f, 0.2f, 0.6f); // set the window refresh colour
TexturedModel dirtModel = ModelLoader.loadGenericCube("block/cubes/stone/brick/stonebrick.png");
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.camera = new FirstPersonCamera(player);
this.player.isVisible = false;