mayzhengxi 我按照技术文档打出来的 但是不知道怎么回事自提并没有显示出来也没有报错这是怎么回事 后面我在bin文件夹下 建了个H5文件夹 在建了个res 文件夹把资料放进去 控制台显示 [warn]Retry to load: res/ziti.fnt [warn]Retry to load: res/ziti.png [error]Failed to load: res/ziti.fnt [error]Failed to load: res/ziti.png 知道的说说吧
Supermang42 this.mBitmapFont.loadFont( "ziti.fnt", new Laya.Handler( this, onLoaded ) );上面的 "ziti.fnt" 路徑錯誤,需寫完整路徑。 Example :假設fnt檔案跟png檔案都放在res資料夾底下,那你就應該寫這樣。 this.mBitmapFont.loadFont( "res/ziti.fnt", new Laya.Handler( this, onLoaded ) );