Libgdx. Screen organization

霸气de小男生 提交于 2019-12-24 19:54:59

问题


Good day.

How can I organize screen like this?

I mean, that screen splitted on 2 parts: game scene and panel. I'm using TiledMap for rendering game space. My code:

map = new TmxMapLoader().load("maps/first.tmx");
mapRenderer = new OrthogonalTiledMapRenderer(map, 1f / 32f);

cam = new OrthographicCamera(MyWorld.CAMERA_WIDTH, MyWorld.CAMERA_HEIGHT);
mapRenderer.setView(cam);

In that case game space fills whole screen.

Thanks.


回答1:


You can use two cameras and overlay them, one renders the game scene and the other the panel. Or if you use the libgdx Stage you can use two stages and draw the panel stage after the game scene stage.



来源:https://stackoverflow.com/questions/17261057/libgdx-screen-organization

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!