public void setText(String text) { this.text = text; this.getMesh().deleteBuffers(); this.setMesh(buildMesh()); } }
public void setText(String text) { this.text = text; this.getMesh().deleteBuffers(); this.setMesh(buildMesh()); } }
public void setText(String text) { this.text = text; this.getMesh().deleteBuffers(); this.setMesh(buildMesh()); } }
public Hud(String statusText) throws Exception { this.statusTextItem = new TextItem(statusText, FONT_TEXTURE, FONT_COLS, FONT_ROWS); this.statusTextItem.getMesh().getMaterial().setAmbientColour(new Vector4f(1, 1, 1, 1)); gameItems = new GameItem[]{statusTextItem}; }
public Hud(String statusText) throws Exception { this.statusTextItem = new TextItem(statusText, FONT_TEXTURE, FONT_COLS, FONT_ROWS); this.statusTextItem.getMesh().getMaterial().setAmbientColour(new Vector4f(1, 1, 1, 1)); // Create compass Mesh mesh = OBJLoader.loadMesh("/models/compass.obj"); Material material = new Material(); material.setAmbientColour(new Vector4f(1, 0, 0, 1)); mesh.setMaterial(material); compassItem = new GameItem(mesh); compassItem.setScale(40.0f); // Rotate to transform it to screen coordinates compassItem.setRotation(0f, 0f, 180f); // Create list that holds the items that compose the HUD gameItems = new GameItem[]{statusTextItem, compassItem}; }
public Hud(String statusText) throws Exception { FontTexture fontTexture = new FontTexture(FONT, CHARSET); this.statusTextItem = new TextItem(statusText, fontTexture); this.statusTextItem.getMesh().getMaterial().setAmbientColour(new Vector4f(1, 1, 1, 1)); // Create compass Mesh mesh = OBJLoader.loadMesh("/models/compass.obj"); Material material = new Material(); material.setAmbientColour(new Vector4f(1, 0, 0, 1)); mesh.setMaterial(material); compassItem = new GameItem(mesh); compassItem.setScale(40.0f); // Rotate to transform it to screen coordinates compassItem.setRotation(0f, 0f, 180f); // Create list that holds the items that compose the HUD gameItems = new GameItem[]{statusTextItem, compassItem}; }
public Hud(String statusText) throws Exception { FontTexture fontTexture = new FontTexture(FONT, CHARSET); this.statusTextItem = new TextItem(statusText, fontTexture); this.statusTextItem.getMesh().getMaterial().setAmbientColour(new Vector4f(1, 1, 1, 1)); // Create compass Mesh mesh = OBJLoader.loadMesh("/models/compass.obj"); Material material = new Material(); material.setAmbientColour(new Vector4f(1, 0, 0, 1)); mesh.setMaterial(material); compassItem = new GameItem(mesh); compassItem.setScale(40.0f); // Rotate to transform it to screen coordinates compassItem.setRotation(0f, 0f, 180f); // Create list that holds the items that compose the HUD gameItems = new GameItem[]{statusTextItem, compassItem}; }
public Hud(String statusText) throws Exception { FontTexture fontTexture = new FontTexture(FONT, CHARSET); this.statusTextItem = new TextItem(statusText, fontTexture); this.statusTextItem.getMesh().getMaterial().setAmbientColour(new Vector4f(1, 1, 1, 1)); // Create compass Mesh mesh = OBJLoader.loadMesh("/models/compass.obj"); Material material = new Material(); material.setAmbientColour(new Vector4f(1, 0, 0, 1)); mesh.setMaterial(material); compassItem = new GameItem(mesh); compassItem.setScale(40.0f); // Rotate to transform it to screen coordinates compassItem.setRotation(0f, 0f, 180f); // Create list that holds the items that compose the HUD gameItems = new GameItem[]{statusTextItem, compassItem}; }