Save canvas

This commit is contained in:
ckcz123 2018-03-10 21:02:47 +08:00
parent ce0e80c4fa
commit cd149a0360
4 changed files with 0 additions and 14 deletions

View File

@ -418,10 +418,6 @@ actions.prototype.ondown = function (x ,y) {
}
core.status.downTime = new Date();
// core.status.holdingPath=1;
//core.status.mouseOutCheck =1;
// window.setTimeout(core.clearStepPostfix);
core.saveCanvas('ui');
core.clearMap('ui', 0, 0, 416,416);
var pos={'x':x,'y':y}
core.status.stepPostfix=[];

View File

@ -520,8 +520,6 @@ maps.prototype.moveBlock = function(x,y,steps,time,immediateHide,callback) {
time = time || 500;
core.status.replay.animate=true;
//clearInterval(core.interval.tipAnimate);
core.saveCanvas('animate');
core.clearMap('animate', 0, 0, 416, 416);
var block = core.getBlock(x,y,core.status.floorId,false);
@ -592,7 +590,6 @@ maps.prototype.moveBlock = function(x,y,steps,time,immediateHide,callback) {
core.canvas.animate.drawImage(blockImage, animateCurrent * 32, blockIcon * 32, 32, 32, nowX, nowY, 32, 32);
if (opacityVal<=0) {
clearInterval(animate);
core.loadCanvas('animate');
core.clearMap('animate', 0, 0, 416, 416);
core.setOpacity('animate', 1);
core.status.replay.animate=false;
@ -620,8 +617,6 @@ maps.prototype.moveBlock = function(x,y,steps,time,immediateHide,callback) {
maps.prototype.animateBlock = function (loc,type,time,callback) {
if (type!='hide') type='show';
//clearInterval(core.interval.tipAnimate);
core.saveCanvas('animate');
core.clearMap('animate', 0, 0, 416, 416);
if (typeof loc[0] == 'number' && typeof loc[1] == 'number')
@ -663,11 +658,9 @@ maps.prototype.animateBlock = function (loc,type,time,callback) {
core.setOpacity('animate', opacityVal);
core.clearMap('animate',0,0,416,416);
// core.canvas.animate.drawImage(blockImage, 0, blockIcon * 32, 32, 32, block.x * 32, block.y * 32, 32, 32);
draw();
if (opacityVal >=1 || opacityVal<=0) {
clearInterval(animate);
core.loadCanvas('animate');
core.clearMap('animate', 0, 0, 416, 416);
core.setOpacity('animate', 1);
core.status.replay.animate=false;

View File

@ -163,7 +163,6 @@ ui.prototype.drawTip = function (text, itemIcon) {
var textX, textY, width, height, hide = false, opacityVal = 0;
clearInterval(core.interval.tipAnimate);
core.setFont('data', "16px Arial");
core.saveCanvas('data');
core.setOpacity('data', 0);
core.canvas.data.textAlign = 'left';
if (!core.isset(itemIcon)) {
@ -194,7 +193,6 @@ ui.prototype.drawTip = function (text, itemIcon) {
core.fillText('data', text, textX + 5, textY + 15, '#fff');
if (opacityVal > 0.6 || opacityVal < 0) {
if (hide) {
core.loadCanvas('data');
core.clearMap('data', 5, 5, 400, height);
core.setOpacity('data', 1);
clearInterval(core.interval.tipAnimate);

View File

@ -78,7 +78,6 @@ main.floors.sample0 =
},
},
"changeFloor": { // 楼层转换事件该事件不能和上面的events有冲突同位置点否则会被覆盖
"7,9": {"floorId": "sample1", "stair": "downFloor"},
"6,0": {"floorId": "sample1", "stair": "downFloor"}, // 目标点sample1层的下楼梯位置
"0,11": {"floorId": "sample0", "loc": [0,12]}, // 目标点sample0层的x=0,y=12位置
"0,12": {"floorId": "sample0", "stair": "upFloor"}, // 注意目标层有多个楼梯的话写stair可能会导致到达位置不确定。这时候推荐写loc指明目标点位置。