【发布时间】:2013-11-12 05:21:57
【问题描述】:
我想使用分辨率文件解析器为我的应用选择正确的纹理图集,因此我创建了一个具有几个分辨率的 RFR:
Resolution _568x1136 = new Resolution(568, 1136, ".568x1136");
Resolution _1200x1920 = new Resolution(568, 1136, ".1200x1920");
ResolutionFileResolver resolver = new ResolutionFileResolver(new InternalFileHandleResolver(), _568x1136, _1200x1920);
manager = new AssetManager();
manager.setLoader(TextureAtlas.class, new TextureAtlasLoader(resolver));
现在我想知道,如何命名/放置文件??????
我尝试在 .png 和 .atlas(.png.568.1136 等)后面添加 .1200x1920 和 .568x1136,但没有奏效。
我也尝试过使用文件夹 (parent/568x1136/file.atlas)。
我尝试通过以下方式加载图集:
manager.load("data/atlas/splashscreen/splashscreen.atlas", TextureAtlas.class); // First make sure the splash screen
manager.finishLoading(); // is loaded before loading anything
Assets.splashAtlas = manager.get("data/atlas/splashscreen/splashscreen.atlas", TextureAtlas.class); // else
【问题讨论】:
-
我实际上没有看到您在哪里使用解析器。
-
在代码中添加,忘记复制了。
-
尝试从后缀中删除 . 并尝试将文件放到
data/atlas/splashscreen/568x1136/splashscreen.atlas
标签: android libgdx resolution assets texture-atlas