Add stuff
This commit is contained in:
		@@ -4,9 +4,12 @@
 | 
			
		||||
import com.jme3.texture.FrameBuffer;
 | 
			
		||||
import com.jme3.texture.Image;
 | 
			
		||||
import com.jme3.texture.Texture2D;
 | 
			
		||||
import pp.mdga.client.MdgaState;
 | 
			
		||||
import pp.mdga.client.board.BoardHandler;
 | 
			
		||||
import pp.mdga.client.board.CameraHandler;
 | 
			
		||||
import pp.mdga.client.MdgaApp;
 | 
			
		||||
import pp.mdga.client.button.ButtonRight;
 | 
			
		||||
import pp.mdga.client.button.SettingsButton;
 | 
			
		||||
import pp.mdga.client.gui.GuiHandler;
 | 
			
		||||
 | 
			
		||||
public class GameView extends MdgaView {
 | 
			
		||||
@@ -14,9 +17,16 @@ public class GameView extends MdgaView {
 | 
			
		||||
    private CameraHandler camera;
 | 
			
		||||
    private GuiHandler guiHandler;
 | 
			
		||||
 | 
			
		||||
    private SettingsButton settingsButton;
 | 
			
		||||
 | 
			
		||||
    private ButtonRight cheatButton; //TODO
 | 
			
		||||
 | 
			
		||||
    public GameView(MdgaApp app) {
 | 
			
		||||
        super(app);
 | 
			
		||||
 | 
			
		||||
        settingsButton = new SettingsButton(app, guiNode, this::clickSettings);
 | 
			
		||||
        cheatButton = new ButtonRight(app, guiNode, () -> app.getModelSyncronizer().enter(MdgaState.CEREMONY), "Weiter (CHEAT)", 1);
 | 
			
		||||
 | 
			
		||||
        FilterPostProcessor fpp = new FilterPostProcessor(app.getAssetManager());
 | 
			
		||||
        this.camera = new CameraHandler(app, fpp);
 | 
			
		||||
        this.boardHandler = new BoardHandler(app, fpp);
 | 
			
		||||
@@ -36,6 +46,9 @@ public GameView(MdgaApp app) {
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public void onEnter() {
 | 
			
		||||
        settingsButton.show();
 | 
			
		||||
        cheatButton.show();
 | 
			
		||||
 | 
			
		||||
        camera.init();
 | 
			
		||||
        boardHandler.init();
 | 
			
		||||
        guiHandler.init();
 | 
			
		||||
@@ -46,6 +59,9 @@ public void onLeave() {
 | 
			
		||||
        camera.shutdown();
 | 
			
		||||
        boardHandler.shutdown();
 | 
			
		||||
        guiHandler.shutdown();
 | 
			
		||||
 | 
			
		||||
        settingsButton.hide();
 | 
			
		||||
        cheatButton.hide();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
@@ -77,4 +93,8 @@ public BoardHandler getBoardHandler() {
 | 
			
		||||
    public GuiHandler getGuiHandler() {
 | 
			
		||||
        return guiHandler;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void clickSettings() {
 | 
			
		||||
        //TODO play sound
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user