当我为我的游戏创建一个菜单时,游戏只在android中崩溃。在桌面上运行时一切正常。当我按下游戏和游戏屏幕游戏崩溃时!
public Screen setGameScreen() {
game_screen = new GameScreen(this);
setScreen(game_screen);
return game_screen;
}
按钮代码:
private void generalUpdate(Vector3 touch, OrthographicCamera camera) {
playbutton.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
game.setScreen(game.setGameScreen());
}
});
}
当我点击播放时,在logCat中加载需要太多,我有这个:
05-05 11:21:21.780: D/-heap(11311): GC_CONCURRENT freed 2157K, 17% free 14025K/16867K, paused 2ms+4ms
从45%开始
编辑:我必须添加加载屏幕?