removed tests, fixed null exception in CardLayer

This commit is contained in:
Cedric Beck
2024-12-04 13:56:03 +01:00
parent 44ef21e6af
commit 9199fbffd8
3 changed files with 9 additions and 10 deletions

View File

@@ -115,7 +115,7 @@ public void simpleInitApp() {
gameView = new GameView(this);
ceremonyView = new CeremonyView(this);
enter(MdgaState.GAME);
enter(MdgaState.MAIN);
}
/**

View File

@@ -86,7 +86,7 @@ public void render(RenderManager rm) {
public void update(float tpf) {
if (init && !cardBuffer.isEmpty()) {
for (Spatial spatial : cardBuffer) {
// root.attachChild(spatial);
root.attachChild(spatial);
}
cardBuffer.clear();
}
@@ -94,9 +94,8 @@ public void update(float tpf) {
}
public void addSpatial(Spatial card) {
// cardBuffer.add(card);
root.attachChild(card);
root = root;
if(root == null) cardBuffer.add(card);
else root.attachChild(card);
}
public void deleteSpatial(Spatial spatial) {

View File

@@ -56,7 +56,7 @@ public GameView(MdgaApp app) {
@Override
public void onEnter() {
setOwnColor(Color.AIRFORCE);
// setOwnColor(Color.AIRFORCE);
camera.init(ownColor);
boardHandler.init();
guiHandler.init(ownColor);
@@ -65,10 +65,10 @@ public void onEnter() {
app.getAcousticHandler().playSound(MdgaSound.START);
guiHandler.addPlayer(Color.AIRFORCE, "Cedric");
guiHandler.addPlayer(Color.ARMY, "Ben");
guiHandler.addPlayer(Color.CYBER, "Felix");
guiHandler.addPlayer(Color.NAVY, "Daniel");
// guiHandler.addPlayer(Color.AIRFORCE, "Cedric");
// guiHandler.addPlayer(Color.ARMY, "Ben");
// guiHandler.addPlayer(Color.CYBER, "Felix");
// guiHandler.addPlayer(Color.NAVY, "Daniel");