2017-05-28 41 views

回答

0

我喜歡在開發過程中做的是重新包裝的每一個我運行該項目時所有的原始圖像。這個課程可以安全地註釋掉,但對於我個人的項目來說,包裝很少會超過幾秒鐘。所以只要你不改變現有的文件名,所有的改變和添加都會被推低。

我通常在名爲images的項目文件夾中創建一個單獨的文件夾。在這裏,我把我所有的圖像,如果我想我的包分類我創建額外的文件夾分開打包。然後在桌面模塊中我添加下面幾行:

Settings settings = new Settings(); 
    //settings.XXXXXX change packer settings to your preferences. 

    //Since I set my working folder to android/assets I need to go down 2 
    //folders to get into the root of the project and access images. 
    //Likewise, for output I already start in my assets folder. 
    //So setting the path might differ depending on your working/asset folder. 
    TexturePacker.process(settings, "../../images/tileset01", "tilesets", "tileset01"); 

在上述情況下我已經把我所有的單獨圖像進行tileset01的文件夾project\images\tileset01中,他們將被打包成project\android\assets\tilesetstileset01.pngtileset01.pack