Commit e489941d authored by Nils Hein's avatar Nils Hein
Browse files

Merge branch 'master' of git.finf.uni-hannover.de:MilderJoghurt/FrozenNumbers

parents ff4ebb4d ff1f0c0d
......@@ -35,9 +35,7 @@ import biz.pavonis.hexameter.api.HexagonalGridBuilder;
public class GameScreen implements Screen {
class Player {
public Bubble active;
public Bubble next;
public Vector2 sPos;
public boolean isReady;
public int score = 0;
public boolean placedBubbleThisRound = false;
}
......@@ -110,20 +108,12 @@ public class GameScreen implements Screen {
}
private void playerlogic(Player p, boolean lower) {
if (p.next == null) {
p.next = new Bubble(p.sPos.cpy().add(-100, 0));
p.next.setSize(bubblradius * 2, bubblradius * 2);
p.next.setPos(p.sPos.cpy().add(-100, 0));
}
if (p.active == null) {
p.active = new Bubble(p.next);
p.active = new Bubble(p.sPos.cpy().add(-100, 0));
p.active.setSize(bubblradius * 2, bubblradius * 2);
p.active.setPos(p.sPos.cpy());
System.out.println(p.active.getPos());
//FrozenNumbersGame.assets.get("load.wav",Sound.class).play();
p.next = null;
}
if (Gdx.input.justTouched()) {
......@@ -274,21 +264,11 @@ public class GameScreen implements Screen {
drawTextCentered(String.valueOf(p1.active.getValue()), p1.active.getPos().x, p1.active.getPos().y, p1.active.getColor());
}
if (p1.next != null) {
p1.next.draw(batch);
drawTextCentered(String.valueOf(p1.next.getValue()), p1.next.getPos().x, p1.next.getPos().y, p1.next.getColor());
}
if (p2.active != null) {
p2.active.draw(batch);
drawTextCentered(String.valueOf(p2.active.getValue()), p2.active.getPos().x, p2.active.getPos().y, p2.active.getColor());
}
if (p2.next != null) {
p2.next.draw(batch);
drawTextCentered(String.valueOf(p2.next.getValue()), p2.next.getPos().x, p2.next.getPos().y, p2.next.getColor());
}
for (Bubble bubble : nachbarn.values()) {
bubble.draw(batch);
drawTextCentered(String.valueOf(bubble.getValue()), bubble.getPos().x, bubble.getPos().y, bubble.getColor());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment