commit
45db852c98
@ -308,7 +308,7 @@ actions.prototype.ondown = function (loc) {
|
|||||||
|
|
||||||
// 画板
|
// 画板
|
||||||
if (core.status.played && (core.status.event||{}).id=='paint') {
|
if (core.status.played && (core.status.event||{}).id=='paint') {
|
||||||
this.ondownPaint(loc.x, loc.y);
|
this.ondownPaint(loc.x/core.domStyle.scale, loc.y/core.domStyle.scale);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -346,7 +346,7 @@ actions.prototype.onmove = function (loc) {
|
|||||||
|
|
||||||
// 画板
|
// 画板
|
||||||
if (core.status.played && (core.status.event||{}).id=='paint') {
|
if (core.status.played && (core.status.event||{}).id=='paint') {
|
||||||
this.onmovePaint(loc.x, loc.y)
|
this.onmovePaint(loc.x/core.domStyle.scale, loc.y/core.domStyle.scale)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,6 +376,12 @@ actions.prototype.onup = function () {
|
|||||||
if (core.isset(core.status.replay)&&core.status.replay.replaying
|
if (core.isset(core.status.replay)&&core.status.replay.replaying
|
||||||
&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0&&core.status.event.id!='viewMaps') return;
|
&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0&&core.status.event.id!='viewMaps') return;
|
||||||
|
|
||||||
|
// 画板
|
||||||
|
if (core.status.played && (core.status.event||{}).id=='paint') {
|
||||||
|
this.onupPaint()
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
clearTimeout(core.timeout.onDownTimeout);
|
clearTimeout(core.timeout.onDownTimeout);
|
||||||
core.timeout.onDownTimeout = null;
|
core.timeout.onDownTimeout = null;
|
||||||
clearInterval(core.interval.onDownInterval);
|
clearInterval(core.interval.onDownInterval);
|
||||||
@ -2412,7 +2418,7 @@ actions.prototype.clickAbout = function () {
|
|||||||
if (core.isPlaying())
|
if (core.isPlaying())
|
||||||
core.ui.closePanel();
|
core.ui.closePanel();
|
||||||
else
|
else
|
||||||
core.restart();
|
core.restart(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -335,8 +335,8 @@ control.prototype.resetStatus = function(hero, hard, floorId, route, maps, value
|
|||||||
}
|
}
|
||||||
|
|
||||||
////// 重新开始游戏;此函数将回到标题页面 //////
|
////// 重新开始游戏;此函数将回到标题页面 //////
|
||||||
control.prototype.restart = function() {
|
control.prototype.restart = function(noAnimate) {
|
||||||
this.showStartAnimate(true);
|
this.showStartAnimate(noAnimate);
|
||||||
if (core.bgms.length>0)
|
if (core.bgms.length>0)
|
||||||
core.playBgm(core.bgms[0]);
|
core.playBgm(core.bgms[0]);
|
||||||
}
|
}
|
||||||
@ -1669,7 +1669,7 @@ control.prototype.chooseReplayFile = function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
core.startGame(obj.hard, obj.seed, core.decode(obj.route));
|
core.startGame(obj.hard, obj.seed, core.decodeRoute(obj.route));
|
||||||
}, function () {
|
}, function () {
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@ -362,8 +362,8 @@ core.prototype.startGame = function (hard, seed, route, callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
////// 重新开始游戏;此函数将回到标题页面 //////
|
////// 重新开始游戏;此函数将回到标题页面 //////
|
||||||
core.prototype.restart = function() {
|
core.prototype.restart = function(noAnimate) {
|
||||||
core.control.restart();
|
core.control.restart(noAnimate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////// 系统事件相关 END ///////////
|
/////////// 系统事件相关 END ///////////
|
||||||
|
|||||||
@ -2468,7 +2468,7 @@ ui.prototype.drawPaint = function () {
|
|||||||
|
|
||||||
core.statusBar.image.book.src = core.statusBar.icons.paint.src;
|
core.statusBar.image.book.src = core.statusBar.icons.paint.src;
|
||||||
core.statusBar.image.fly.src = core.statusBar.icons.erase.src;
|
core.statusBar.image.fly.src = core.statusBar.icons.erase.src;
|
||||||
core.statusBar.image.toolbox.src = core.statusBar.icons.delete.src;
|
core.statusBar.image.toolbox.src = core.statusBar.icons.empty.src;
|
||||||
core.statusBar.image.settings.src = core.statusBar.icons.exit.src;
|
core.statusBar.image.settings.src = core.statusBar.icons.exit.src;
|
||||||
core.statusBar.image.book.style.opacity = 1;
|
core.statusBar.image.book.style.opacity = 1;
|
||||||
core.statusBar.image.fly.style.opacity = 1;
|
core.statusBar.image.fly.style.opacity = 1;
|
||||||
|
|||||||
5
main.js
5
main.js
@ -130,7 +130,7 @@ function main() {
|
|||||||
'skill': 25,
|
'skill': 25,
|
||||||
'paint': 26,
|
'paint': 26,
|
||||||
'erase': 27,
|
'erase': 27,
|
||||||
'delete': 28,
|
'empty': 28,
|
||||||
'exit': 29,
|
'exit': 29,
|
||||||
},
|
},
|
||||||
'floor': document.getElementById('floor'),
|
'floor': document.getElementById('floor'),
|
||||||
@ -381,8 +381,9 @@ main.dom.data.ontouchmove = function (e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
////// 手指离开触摸屏时 //////
|
////// 手指离开触摸屏时 //////
|
||||||
main.dom.data.ontouchend = function () {
|
main.dom.data.ontouchend = function (e) {
|
||||||
try {
|
try {
|
||||||
|
e.preventDefault();
|
||||||
main.core.onup();
|
main.core.onup();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user