INNER CODE UNIT · Java

setGameView

BSVogler/WurfelEngineSDK · core/src/main/java/editor/EditorToggler.java:36

	public void setGameView(GameView view) {
		this.gameView = view;
	}

	/**
	 * Adds the buttons to the stage if missing
	 *
	 * @param view The gameView which renders the buttons.
	 * @param dt
	 */
	public void update(EngineView view, float dt) {
		if (WE.isInEditor() && visible) {
			if (playButton == null && this.gameView != null) {
				try {
					TextureAtlas spritesheet = WE.getAsset("com/bombinggames/wurfelengine/core/skin/gui.txt");
					//add play button
					playButton = new Image(spritesheet.findRegion("play_button"));
					playButton.setX(Gdx.graphics.getWidth() - offsetX);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…