Fix Browser Bug
This commit is contained in:
parent
8cd049c720
commit
672afd72b5
@ -125,8 +125,7 @@ events.prototype.gameOver = function (ending, fromReplay) {
|
||||
|
||||
// 清空图片和天气
|
||||
core.clearMap('animate', 0, 0, 416, 416);
|
||||
while (core.dom.gif2.firstChild)
|
||||
core.dom.gif2.removeChild(core.dom.gif2.firstChild);
|
||||
core.dom.gif2.innerHTML = "";
|
||||
core.clearMap('weather', 0, 0, 416, 416)
|
||||
core.animateFrame.weather.type = null;
|
||||
core.animateFrame.weather.level = 0;
|
||||
@ -454,8 +453,7 @@ events.prototype.doAction = function() {
|
||||
core.dom.gif2.appendChild(gif);
|
||||
}
|
||||
else {
|
||||
while (core.dom.gif2.firstChild)
|
||||
core.dom.gif2.removeChild(core.dom.gif2.firstChild);
|
||||
core.dom.gif2.innerHTML = "";
|
||||
}
|
||||
this.doAction();
|
||||
break;
|
||||
@ -966,11 +964,6 @@ events.prototype.changeFloor = function (floorId, stair, heroLoc, time, callback
|
||||
else core.setWeather();
|
||||
|
||||
// 清除gif
|
||||
/*
|
||||
while (core.dom.gif.firstChild) {
|
||||
core.dom.gif.removeChild(core.dom.gif.firstChild);
|
||||
}
|
||||
*/
|
||||
core.dom.gif.innerHTML = "";
|
||||
|
||||
// 检查重生
|
||||
|
||||
@ -331,8 +331,7 @@ maps.prototype.drawMap = function (mapName, callback) {
|
||||
if (!t[3]) {
|
||||
core.canvas.bg.drawImage(image, dx * ratio, dy * ratio, Math.min(size - dx * ratio, ratio * image.width), Math.min(size - dy * ratio, ratio * image.height));
|
||||
if (/.*\.gif/i.test(p)) {
|
||||
while (core.dom.gif.firstChild)
|
||||
core.dom.gif.removeChild(core.dom.gif.firstChild);
|
||||
core.dom.gif.innerHTML = "";
|
||||
var gif = new Image();
|
||||
gif.src = core.material.images.images[p].src;
|
||||
gif.style.position = 'absolute';
|
||||
|
||||
@ -20,8 +20,7 @@ ui.prototype.clearMap = function (map, x, y, width, height) {
|
||||
for (var m in core.canvas) {
|
||||
core.canvas[m].clearRect(0, 0, 416, 416);
|
||||
}
|
||||
while (core.dom.gif.firstChild)
|
||||
core.dom.gif.removeChild(core.dom.gif.firstChild);
|
||||
core.dom.gif.innerHTML = "";
|
||||
}
|
||||
else {
|
||||
core.canvas[map].clearRect(x||0, y||0, width||416, height||416);
|
||||
|
||||
@ -5,7 +5,7 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"sample0", "sample1", "sample2", "MT0"
|
||||
],
|
||||
"images" : [
|
||||
"bg.jpg"
|
||||
"bg.jpg", "timg.gif"
|
||||
],
|
||||
"animates" : [
|
||||
"hand", "sword", "zone",
|
||||
|
||||
@ -9,7 +9,7 @@ main.floors.sample0 =
|
||||
"canFlyTo": true, // 该楼能否被楼传器飞到(不能的话在该楼也不允许使用楼传器)
|
||||
"canUseQuickShop": true, // 该层是否允许使用快捷商店
|
||||
"defaultGround": "ground", // 默认地面的图块ID(terrains中)
|
||||
"images": [], // 该层默认显示的所有图片;详细用法请查看文档“自定义素材”中的说明。
|
||||
"images": [[0,0,"timg.gif",false]], // 该层默认显示的所有图片;详细用法请查看文档“自定义素材”中的说明。
|
||||
// "color": [0,0,0,0.3] // 该层的默认画面色调。本项可不写(代表无色调),如果写需要是一个RGBA数组。
|
||||
// "weather": ["snow",5], // 该层的默认天气。本项可忽略表示晴天,如果写则第一项为"rain"或"snow"代表雨雪,第二项为1-10之间的数代表强度。
|
||||
"bgm": "bgm.mp3", // 到达该层后默认播放的BGM。本项可忽略。
|
||||
|
||||
BIN
project/images/timg.gif
Normal file
BIN
project/images/timg.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 954 KiB |
Loading…
Reference in New Issue
Block a user