LibGDX - how do I make my menu screen switch to the Game screen?

后端 未结 2 594
没有蜡笔的小新
没有蜡笔的小新 2021-01-27 10:24

When I run the application my menu screen shows, but when I click the screen to begin playing the game the game begins playing but the menu screen is still their overlaying the

2条回答
  •  攒了一身酷
    2021-01-27 10:55

    Not sure but I think your render() method on GameScreen not called. you must implement method render(float delta) that use delta time for parameter.

    replace

    public void render() {
        // your code
    }
    

    with

    public void render(float delta) {
        // your code
    }
    

提交回复
热议问题