diff --git a/src/nl/ibe/hex/app/GameNiftyController.java b/src/nl/ibe/hex/app/GameNiftyController.java index 499873d..7690756 100644 --- a/src/nl/ibe/hex/app/GameNiftyController.java +++ b/src/nl/ibe/hex/app/GameNiftyController.java @@ -18,6 +18,7 @@ import nl.ibe.hex.game.IHexGame; import nl.ibe.hex.game.IHexGameListener; import nl.ibe.hex.supply.ColorSupplier; +import nl.ibe.hex.view.View; import nl.ibe.hex.view.update.TickerListener; import nl.ibe.hex.view.update.UpdateListener; import nl.ibe.hex.view.update.UpdateProvider; @@ -77,6 +78,8 @@ public void sync() { Label currPl = nifty.getCurrentScreen().findNiftyControl("c_playerCurrent", Label.class); currPl.setText(getPlayerInfo("current")); } + + } public String getPlayerInfo(String type) { @@ -125,6 +128,8 @@ public String getColor(String colorId) { @Override public void tickUpdate(double hertz) { sync(); + + //((nl.ibe.hex.view.View) this.view).boardReset(); } public void gameEnd(HexPlayer winner) { diff --git a/src/nl/ibe/hex/supply/ColorSupplier.java b/src/nl/ibe/hex/supply/ColorSupplier.java index bb14e00..754276a 100644 --- a/src/nl/ibe/hex/supply/ColorSupplier.java +++ b/src/nl/ibe/hex/supply/ColorSupplier.java @@ -42,9 +42,9 @@ public static ColorRGBA getPlayerColor(Team team) { //Bacteria ColorRGBA color = SettingsHQ.Graphics.Colours.colour_bacteria.clone(); - float g = Random.approximate(color.g, 0.2f); + float g = Random.approximate(color.g, SettingsHQ.Graphics.Colours.bac_distort); - color.g = g; + color.a = g; return color; diff --git a/src/nl/ibe/hex/supply/ModelSupplier.java b/src/nl/ibe/hex/supply/ModelSupplier.java index d2e617a..cf24a5c 100644 --- a/src/nl/ibe/hex/supply/ModelSupplier.java +++ b/src/nl/ibe/hex/supply/ModelSupplier.java @@ -71,7 +71,7 @@ public static Geometry getPlayerShape(Team team) { mesh = new Box(0.35f, 0.35f, 0.35f); } else if(team.getModelID().equals(1, "model")) { //Bacteria - mesh = new Sphere(6, 6, 0.35f); + mesh = new Sphere(16, 16, 0.35f); } else if(team.getModelID().equals(2, "model")) { mesh = new Torus(8, 8, 0.05f, 0.35f); } diff --git a/src/nl/ibe/hex/view/View.java b/src/nl/ibe/hex/view/View.java index 946905d..fa188a4 100644 --- a/src/nl/ibe/hex/view/View.java +++ b/src/nl/ibe/hex/view/View.java @@ -272,12 +272,7 @@ public void onClick(HexSpatial hex) { selected = false; //Reset the colors - for (Map.Entry en : grid.grid.entrySet()) { - HexCoordinate key = en.getKey(); - HexSpatial value = en.getValue(); - - value.setMaterial(MaterialSupplier.getColoredMaterial(ColorSupplier.getBoardColor())); - } + boardReset(); } else { //!selected @@ -321,6 +316,15 @@ public void onClick(HexSpatial hex) { } + public void boardReset() { + for (Map.Entry en : grid.grid.entrySet()) { + HexCoordinate key = en.getKey(); + HexSpatial value = en.getValue(); + + value.setMaterial(MaterialSupplier.getColoredMaterial(ColorSupplier.getBoardColor())); + } + } + /** * Checks if the player isn't null. *