简体   繁体   English

AndEngine中的TMXLoader

[英]TMXLoader in AndEngine

I'm using png format for tiling and using TMXLoader to load my tiled map. 我正在使用png格式进行平铺,并使用TMXLoader加载平铺的地图。 The problem occured when my code running in android device not in the emulator. 当我的代码在android设备中而不是模拟器中运行时,发生了问题。 Somehow, any image that use png for backend (map) is displayed grayly in the device. 不知何故,任何将png用作后端(地图)的图像都会在设备中显示为灰色。 However, my tmxLoader seems to be fine loading the tiled map, no throwing exception at all. 但是,我的tmxLoader似乎可以很好地加载平铺地图,完全没有抛出异常。 I'll give the screenshot in device and emulator. 我将在设备和仿真器中提供屏幕截图。 Is this the problem in android (maybe libpng ??). 这是android(也许libpng ??)中的问题。

仿真器映像设备图片

ok, it's solved. 好,解决了。 It's because the png format that i created (maybe because of some options when saving the png) cannot be read by tmx loader engine, because later on, i tried to save it without using any options at all, it loaded nicely in the device (solved) 这是因为tmx加载器引擎无法读取我创建的png格式(可能是因为保存png时有一些选项),因为后来我尝试完全不使用任何选项来保存它,并将其很好地加载到了设备中(解决了)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM