Lines Matching defs:this
55 this.flyCam.setMoveSpeed(100f);
57 this.stateManager.attach(state);
60 this.mat_terrain = new Material(this.assetManager, "Common/MatDefs/Terrain/HeightBasedTerrain.j3md");
73 Texture grass = this.assetManager.loadTexture("Textures/Terrain/splat/grass.jpg");
75 this.mat_terrain.setTexture("region1ColorMap", grass);
76 this.mat_terrain.setVector3("region1", new Vector3f(88, 200, this.grassScale));
79 Texture dirt = this.assetManager.loadTexture("Textures/Terrain/splat/dirt.jpg");
81 this.mat_terrain.setTexture("region2ColorMap", dirt);
82 this.mat_terrain.setVector3("region2", new Vector3f(0, 90, this.dirtScale));
85 Texture rock = this.assetManager.loadTexture("Textures/Terrain/Rock2/rock.jpg");
87 this.mat_terrain.setTexture("region3ColorMap", rock);
88 this.mat_terrain.setVector3("region3", new Vector3f(198, 260, this.rockScale));
90 this.mat_terrain.setTexture("region4ColorMap", rock);
91 this.mat_terrain.setVector3("region4", new Vector3f(198, 260, this.rockScale));
93 this.mat_terrain.setTexture("slopeColorMap", rock);
94 this.mat_terrain.setFloat("slopeTileFactor", 32);
96 this.mat_terrain.setFloat("terrainSize", 129);
98 this.terrain = new TerrainGrid("terrain", 65, 257, new ImageTileLoader(assetManager, new Namer() {
105 this.terrain.setMaterial(mat_terrain);
106 this.terrain.setLocalTranslation(0, 0, 0);
107 this.terrain.setLocalScale(1f, 1f, 1f);
108 this.rootNode.attachChild(this.terrain);
110 TerrainLodControl control = new TerrainLodControl(this.terrain, getCamera());
112 this.terrain.addControl(control);
117 this.getCamera().setLocation(new Vector3f(0, 200, 0));
119 this.viewPort.setBackgroundColor(new ColorRGBA(0.7f, 0.8f, 1f, 1f));
161 this.initKeys();
166 this.inputManager.addMapping("Lefts", new KeyTrigger(KeyInput.KEY_A));
167 this.inputManager.addMapping("Rights", new KeyTrigger(KeyInput.KEY_D));
168 this.inputManager.addMapping("Ups", new KeyTrigger(KeyInput.KEY_W));
169 this.inputManager.addMapping("Downs", new KeyTrigger(KeyInput.KEY_S));
170 this.inputManager.addMapping("Jumps", new KeyTrigger(KeyInput.KEY_SPACE));
171 this.inputManager.addListener(this.actionListener, "Lefts");
172 this.inputManager.addListener(this.actionListener, "Rights");
173 this.inputManager.addListener(this.actionListener, "Ups");
174 this.inputManager.addListener(this.actionListener, "Downs");
175 this.inputManager.addListener(this.actionListener, "Jumps");
187 TerrainGridTest.this.left = true;
189 TerrainGridTest.this.left = false;
193 TerrainGridTest.this.right = true;
195 TerrainGridTest.this.right = false;
199 TerrainGridTest.this.up = true;
201 TerrainGridTest.this.up = false;
205 TerrainGridTest.this.down = true;
207 TerrainGridTest.this.down = false;
210 TerrainGridTest.this.player3.jump();
218 Vector3f camDir = this.cam.getDirection().clone().multLocal(0.6f);
219 Vector3f camLeft = this.cam.getLeft().clone().multLocal(0.4f);
220 this.walkDirection.set(0, 0, 0);
221 if (this.left) {
222 this.walkDirection.addLocal(camLeft);
224 if (this.right) {
225 this.walkDirection.addLocal(camLeft.negate());
227 if (this.up) {
228 this.walkDirection.addLocal(camDir);
230 if (this.down) {
231 this.walkDirection.addLocal(camDir.negate());
235 this.player3.setWalkDirection(this.walkDirection);
236 this.cam.setLocation(this.player3.getPhysicsLocation());