drawAnimate stop
This commit is contained in:
1 parent
6169c1b092
commit
46f075e996
4 files changed
+20
-4
No files matched your search
+2
-1
@@ -122,9 +122,10 @@ control.prototype.setRequestAnimationFrame = function () {
|
||||
var animateObjs = [];
|
||||
for (var i=0;i<core.status.animateObjs.length;i++) {
|
||||
var obj = core.status.animateObjs[i];
|
||||
if (obj.index == obj.animate.frames.length) {
|
||||
if (obj.index == obj.animate.frames.length || core.hasFlag("stopAnimate_"+obj.id)) {
|
||||
// 绘制完毕
|
||||
delete core.animateFrame.asyncId[obj.id];
|
||||
core.removeFlag("stopAnimate_"+obj.id);
|
||||
// 异步执行回调...
|
||||
(function(callback) {
|
||||
setTimeout(function() {
|
||||
|
||||
+1
-1
@@ -892,7 +892,7 @@ core.prototype.drawBoxAnimate = function () {
|
||||
|
||||
////// 绘制动画 //////
|
||||
core.prototype.drawAnimate = function (name, x, y, callback) {
|
||||
core.maps.drawAnimate(name, x, y, callback);
|
||||
return core.maps.drawAnimate(name, x, y, callback);
|
||||
}
|
||||
|
||||
////// 更新领域、夹击、阻击的伤害地图 //////
|
||||
|
||||
+3
-2
@@ -1359,13 +1359,13 @@ maps.prototype.drawAnimate = function (name, x, y, callback) {
|
||||
// 正在播放录像:不显示动画
|
||||
if (core.isset(core.status.replay) && core.status.replay.replaying) {
|
||||
if (core.isset(callback)) callback();
|
||||
return;
|
||||
return -1;
|
||||
}
|
||||
|
||||
// 检测动画是否存在
|
||||
if (!core.isset(core.material.animates[name]) || !core.isset(x) || !core.isset(y)) {
|
||||
if (core.isset(callback)) callback();
|
||||
return;
|
||||
return -1;
|
||||
}
|
||||
|
||||
// 开始绘制
|
||||
@@ -1384,6 +1384,7 @@ maps.prototype.drawAnimate = function (name, x, y, callback) {
|
||||
});
|
||||
|
||||
core.animateFrame.asyncId[animateId] = true;
|
||||
return animateId;
|
||||
}
|
||||
|
||||
maps.prototype.setFloorImage = function (type, loc, floorId, callback) {
|
||||
|
||||
Reference in new issue
Block a user