Game Development Reference
In-Depth Information
worldInstance.create_box(new Vector3(w += 2, 1.5f, 10), true);
}
rayTestCB = new ClosestRayResultCallback(Vector3.Zero, Vector3.Z);
font = new BitmapFont();
guiCam = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.
getHeight());
guiCam.position.set(guiCam.viewportWidth / 2f, guiCam.viewportHeight /
2f, 0);
guiCam.update();
batch = new SpriteBatch();
float wt = Gdx.graphics.getWidth() / 5f;
float dt = .1f * wt;
box = new Sprite(new Texture("cube.png"));
box.setPosition(0, 0);
cone = new Sprite(new Texture("cone.png"));
cone.setPosition(wt + dt, 0);
sphere = new Sprite(new Texture("sphere.png"));
sphere.setPosition(2 * wt + dt, 0);
cylinder = new Sprite(new Texture("cylinder.png"));
cylinder.setPosition(3 * wt + dt, 0);
raypick = new Sprite(new Texture("ray.png"));
raypick.setPosition(4 * wt + dt, 0);
tick = new Sprite(new Texture("mark.png"));
enableButton(sphere);
collisionListener = new MyContactListener();
Gdx.input.setInputProcessor(adapter);
}
public void enableButton(Sprite sp) {
tick.setPosition(sp.getX(), sp.getY());
}
 
Search WWH ::




Custom Search