merge development into test #26
@@ -4,9 +4,12 @@
|
|||||||
import com.jme3.texture.FrameBuffer;
|
import com.jme3.texture.FrameBuffer;
|
||||||
import com.jme3.texture.Image;
|
import com.jme3.texture.Image;
|
||||||
import com.jme3.texture.Texture2D;
|
import com.jme3.texture.Texture2D;
|
||||||
|
import pp.mdga.client.MdgaState;
|
||||||
import pp.mdga.client.board.BoardHandler;
|
import pp.mdga.client.board.BoardHandler;
|
||||||
import pp.mdga.client.board.CameraHandler;
|
import pp.mdga.client.board.CameraHandler;
|
||||||
import pp.mdga.client.MdgaApp;
|
import pp.mdga.client.MdgaApp;
|
||||||
|
import pp.mdga.client.button.ButtonRight;
|
||||||
|
import pp.mdga.client.button.SettingsButton;
|
||||||
import pp.mdga.client.gui.GuiHandler;
|
import pp.mdga.client.gui.GuiHandler;
|
||||||
|
|
||||||
public class GameView extends MdgaView {
|
public class GameView extends MdgaView {
|
||||||
@@ -14,9 +17,16 @@ public class GameView extends MdgaView {
|
|||||||
private CameraHandler camera;
|
private CameraHandler camera;
|
||||||
private GuiHandler guiHandler;
|
private GuiHandler guiHandler;
|
||||||
|
|
||||||
|
private SettingsButton settingsButton;
|
||||||
|
|
||||||
|
private ButtonRight cheatButton; //TODO
|
||||||
|
|
||||||
public GameView(MdgaApp app) {
|
public GameView(MdgaApp app) {
|
||||||
super(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());
|
FilterPostProcessor fpp = new FilterPostProcessor(app.getAssetManager());
|
||||||
this.camera = new CameraHandler(app, fpp);
|
this.camera = new CameraHandler(app, fpp);
|
||||||
this.boardHandler = new BoardHandler(app, fpp);
|
this.boardHandler = new BoardHandler(app, fpp);
|
||||||
@@ -36,6 +46,9 @@ public GameView(MdgaApp app) {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnter() {
|
public void onEnter() {
|
||||||
|
settingsButton.show();
|
||||||
|
cheatButton.show();
|
||||||
|
|
||||||
camera.init();
|
camera.init();
|
||||||
boardHandler.init();
|
boardHandler.init();
|
||||||
guiHandler.init();
|
guiHandler.init();
|
||||||
@@ -46,6 +59,9 @@ public void onLeave() {
|
|||||||
camera.shutdown();
|
camera.shutdown();
|
||||||
boardHandler.shutdown();
|
boardHandler.shutdown();
|
||||||
guiHandler.shutdown();
|
guiHandler.shutdown();
|
||||||
|
|
||||||
|
settingsButton.hide();
|
||||||
|
cheatButton.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -77,4 +93,8 @@ public BoardHandler getBoardHandler() {
|
|||||||
public GuiHandler getGuiHandler() {
|
public GuiHandler getGuiHandler() {
|
||||||
return guiHandler;
|
return guiHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void clickSettings() {
|
||||||
|
//TODO play sound
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user