private void OnGroundComplete(GND.Mesh mesh) { width = mesh.width; height = mesh.height; Ground ground = new Ground(); ground.BuildMesh(mesh); ground.InitTextures(mesh); ground.Render(); if (mesh.waterVertCount > 0) { water = new Water(); water.InitTextures(mesh, world.water); water.BuildMesh(mesh); } //initialize sounds for (int i = 0; i < world.sounds.Count; i++) { world.sounds[i].pos[0] += mesh.width; world.sounds[i].pos[1] *= -1; world.sounds[i].pos[2] += mesh.height; //world.sounds[i].pos[2] = tmp; world.sounds[i].range *= 0.3f; world.sounds[i].tick = 0; } groundCompleted = true; }