请帮我解决这个问题。
游戏:Dragonbound,我想把地面PNG换成另一个,但我不能
F12,将地图PNG更改为另一个
我现在把我的PNG地图放在地面
现在我去https://dragonbound.net/#server-6(开始1vs1游戏)
在任何人射杀他之后发现地面
控制台中的错误
这是出现错误的函数,错误出现在“[...] var j = new Image”
中function CGround(a) {
var b = MapNumberToObject(a),
a = this.canvas = document.getElementById("ground_canvas"),
d = b.w,
c = b.h;
this.w = a.width = d;
this.h = a.height = c;
$("#ground_canvas").css({
width : d,
height : c
});
var e = DragonDecompress(b.ground),
f = a.getContext("2d");
this.imageData = f.createImageData(d, c);
BooleanArrayToImageData(e, this.imageData);
f.putImageData(this.imageData, 0, 0);
var j = new Image,
k = this;
j.onload = function () {
var a = ImageDataToBooleanArray(k.imageData);
f.drawImage(j, 0, 0, Math.max(b.w, j.width), Math.max(b.h,
j.height));
k.imageData = f.getImageData(0, 0, d, c);
BooleanArrayToImageData(a, k.imageData, !b.disable_shadow);
f.putImageData(k.imageData, 0, 0)
};
j.src = -1 == b.fg.indexOf("/") ? "/static/images/maps/" + b.fg + ".jpg" : b.fg;
a = b.bg;
-1 == a.indexOf("/") && (a = "/static/images/maps/" + a + ".jpg");
this.bg = a;
this.bgcolor = b.bgcolor;
this.SetMapBackground();
$("#gameScreen").css("background-color", b.bgcolor)
}
请帮助我,非常感谢:)
对不起我的英文:(