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; 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;