removed tests, fixed null exception in CardLayer
This commit is contained in:
		@@ -115,7 +115,7 @@ public void simpleInitApp() {
 | 
			
		||||
        gameView = new GameView(this);
 | 
			
		||||
        ceremonyView = new CeremonyView(this);
 | 
			
		||||
 | 
			
		||||
        enter(MdgaState.GAME);
 | 
			
		||||
        enter(MdgaState.MAIN);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -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) {
 | 
			
		||||
 
 | 
			
		||||
@@ -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");
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user