Lines Matching defs:this
53 this.flyCam.setMoveSpeed(100f);
55 this.stateManager.attach(state);
58 this.mat_terrain = new Material(this.assetManager, "Common/MatDefs/Terrain/HeightBasedTerrain.j3md");
71 Texture grass = this.assetManager.loadTexture("Textures/Terrain/splat/grass.jpg");
73 this.mat_terrain.setTexture("region1ColorMap", grass);
74 this.mat_terrain.setVector3("region1", new Vector3f(88, 200, this.grassScale));
77 Texture dirt = this.assetManager.loadTexture("Textures/Terrain/splat/dirt.jpg");
79 this.mat_terrain.setTexture("region2ColorMap", dirt);
80 this.mat_terrain.setVector3("region2", new Vector3f(0, 90, this.dirtScale));
83 Texture rock = this.assetManager.loadTexture("Textures/Terrain/Rock2/rock.jpg");
85 this.mat_terrain.setTexture("region3ColorMap", rock);
86 this.mat_terrain.setVector3("region3", new Vector3f(198, 260, this.rockScale));
88 this.mat_terrain.setTexture("region4ColorMap", rock);
89 this.mat_terrain.setVector3("region4", new Vector3f(198, 260, this.rockScale));
91 this.mat_terrain.setTexture("slopeColorMap", rock);
92 this.mat_terrain.setFloat("slopeTileFactor", 32);
94 this.mat_terrain.setFloat("terrainSize", 129);
97 this.terrain = new TerrainGrid("terrain", 65, 257, grid);
99 this.terrain.setMaterial(this.mat_terrain);
100 this.terrain.setLocalTranslation(0, 0, 0);
101 this.terrain.setLocalScale(2f, 1f, 2f);
109 this.rootNode.attachChild(this.terrain);
111 TerrainLodControl control = new TerrainLodControl(this.terrain, getCamera());
113 this.terrain.addControl(control);
118 this.getCamera().setLocation(new Vector3f(0, 256, 0));
120 this.viewPort.setBackgroundColor(new ColorRGBA(0.7f, 0.8f, 1f, 1f));
158 this.initKeys();
163 this.inputManager.addMapping("Lefts", new KeyTrigger(KeyInput.KEY_A));
164 this.inputManager.addMapping("Rights", new KeyTrigger(KeyInput.KEY_D));
165 this.inputManager.addMapping("Ups", new KeyTrigger(KeyInput.KEY_W));
166 this.inputManager.addMapping("Downs", new KeyTrigger(KeyInput.KEY_S));
167 this.inputManager.addMapping("Jumps", new KeyTrigger(KeyInput.KEY_SPACE));
168 this.inputManager.addListener(this.actionListener, "Lefts");
169 this.inputManager.addListener(this.actionListener, "Rights");
170 this.inputManager.addListener(this.actionListener, "Ups");
171 this.inputManager.addListener(this.actionListener, "Downs");
172 this.inputManager.addListener(this.actionListener, "Jumps");
184 TerrainGridTileLoaderTest.this.left = true;
186 TerrainGridTileLoaderTest.this.left = false;
190 TerrainGridTileLoaderTest.this.right = true;
192 TerrainGridTileLoaderTest.this.right = false;
196 TerrainGridTileLoaderTest.this.up = true;
198 TerrainGridTileLoaderTest.this.up = false;
202 TerrainGridTileLoaderTest.this.down = true;
204 TerrainGridTileLoaderTest.this.down = false;
207 TerrainGridTileLoaderTest.this.player3.jump();
215 Vector3f camDir = this.cam.getDirection().clone().multLocal(0.6f);
216 Vector3f camLeft = this.cam.getLeft().clone().multLocal(0.4f);
217 this.walkDirection.set(0, 0, 0);
218 if (this.left) {
219 this.walkDirection.addLocal(camLeft);
221 if (this.right) {
222 this.walkDirection.addLocal(camLeft.negate());
224 if (this.up) {
225 this.walkDirection.addLocal(camDir);
227 if (this.down) {
228 this.walkDirection.addLocal(camDir.negate());
232 this.player3.setWalkDirection(this.walkDirection);
233 this.cam.setLocation(this.player3.getPhysicsLocation());