Project1
标题:
请问如何不读取audio下的音频文件?打包后测试出错
[打印本页]
作者:
allrobot
时间:
2020-11-20 11:43
标题:
请问如何不读取audio下的音频文件?打包后测试出错
打包成安卓文件,安装后测试发现会弹出faild xxx文件或loading error之类的错误,基本是加载音频文件错误啥
老哥们有没有办法不读取音频文件呀,js文件夹里面在哪改?
改好了删掉audio,正好省了安装包一部分空间
作者:
allrobot
时间:
2020-11-20 21:03
好吧,自己到js文件夹找到解决办法了,首先在rpg_core.js查找Graphics.printLoadingError(url)
然后出现这样的函数
ResourceHandler.createLoader = function(url, retryMethod, resignMethod, retryInterval) {
retryInterval = retryInterval || this._defaultRetryInterval;
var reloaders = this._reloaders;
var retryCount = 0;
return function() {
if (retryCount < retryInterval.length) {
setTimeout(retryMethod, retryInterval[retryCount]);
retryCount++;
} else {
if (resignMethod) {
resignMethod();
}
if (url) {
if (reloaders.length === 0) {
Graphics.printLoadingError(url);
SceneManager.stop();
}
reloaders.push(function() {
retryCount = 0;
retryMethod();
});
}
}
};
};
把这函数里面的
if (reloaders.length === 0) {
Graphics.printLoadingError(url);
SceneManager.stop();
}
reloaders.push(function() {
retryCount = 0;
retryMethod();
}
删掉 Graphics.printLoadingError(url);
SceneManager.stop();
就变成这样了
ResourceHandler.createLoader = function(url, retryMethod, resignMethod, retryInterval) {
retryInterval = retryInterval || this._defaultRetryInterval;
var reloaders = this._reloaders;
var retryCount = 0;
return function() {
if (retryCount < retryInterval.length) {
setTimeout(retryMethod, retryInterval[retryCount]);
retryCount++;
} else {
if (resignMethod) {
resignMethod();
}
if (url) {
if (reloaders.length === 0) {
}
reloaders.push(function() {
retryCount = 0;
retryMethod();
});
}
}
};
};
只是把碍眼的输出错误函数删掉了,实际的错误未真正解决。。。不过正好也把audio文件夹删掉了,省一部空间
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1