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

后端 未结 2 559
没有蜡笔的小新
没有蜡笔的小新 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:31

    In addition to Phonbopit's answer. You should probably @Override the render function at GameScreen.

    0 讨论(0)
  • 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
    }
    
    0 讨论(0)
提交回复
热议问题