doAction keepUI

This commit is contained in:
oc 2019-05-14 16:51:34 +08:00
parent 8f03393eb2
commit 58c4600fbd
2 changed files with 9 additions and 6 deletions

View File

@ -952,10 +952,11 @@ core.startEvents(list, x, y, callback)
此函数将调用core.setEvents然后停止勇士再执行core.doAction()。
core.doAction()
core.doAction(keepUI)
执行下一个自定义事件。
此函数将检测事件列表是否全部执行完毕,如果是则执行回调函数。
否则将从事件列表中弹出下一个事件并调用core.doEvent进行执行。
如果keepUI为true则不会清掉UI层和selector适合于自己用脚本的绘制。
core.insertAction(action, x, y, callback, addToLast)

View File

@ -788,11 +788,13 @@ events.prototype.startEvents = function (list, x, y, callback) {
}
////// 执行当前自定义事件列表中的下一个事件 //////
events.prototype.doAction = function () {
// 清空boxAnimate和UI层
core.clearUI();
clearInterval(core.status.event.interval);
core.status.event.interval = null;
events.prototype.doAction = function (keepUI) {
if (!keepUI) {
// 清空boxAnimate和UI层
core.clearUI();
clearInterval(core.status.event.interval);
core.status.event.interval = null;
}
// 判定是否执行完毕
if (this._doAction_finishEvents()) return;
// 当前点坐标和前缀