修复高清画布缩放问题
This commit is contained in:
parent
95c269d829
commit
aaad507cc3
@ -54,7 +54,7 @@ colour : this.tasksColor
|
|||||||
allFloorIds : ['IdString_0','IdString_1']
|
allFloorIds : ['IdString_0','IdString_1']
|
||||||
default :["任务描述",1,"MT1","1,1","MT1,MT2","MT1","1,1","yellowKey:1,redGem:3"]
|
default :["任务描述",1,"MT1","1,1","MT1,MT2","MT1","1,1","yellowKey:1,redGem:3"]
|
||||||
EvalString_Multi_0=EvalString_Multi_0?(',"text": "'+EvalString_Multi_0+'"'): '';
|
EvalString_Multi_0=EvalString_Multi_0?(',"text": "'+EvalString_Multi_0+'"'): '';
|
||||||
var code = '{"type":"taskEvent"'+EvalString_Multi_0+',"n":'+Int_0+',"info":['+tasksList_0+'\n]'+',"setFloor":"'+IdString_0+'","setxy":['+EvalString_0.split(",")+'],"tarFloor":"'+EvalString_1+'","mitFloor":"'+IdString_1+'","mitxy":['+EvalString_2.split(",")+'], "beforeAction": [\n' + action_0 +'],"reward":"'+EvalString_1+'", "action": [\n' + action_1 + ']}\n'
|
var code = '{"type":"taskEvent"'+EvalString_Multi_0+',"n":'+Int_0+',"info":['+tasksList_0+'\n]'+',"setFloor":"'+IdString_0+'","setxy":['+EvalString_0.split(",")+'],"tarFloor":"'+EvalString_1+'","mitFloor":"'+IdString_1+'","mitxy":['+EvalString_2.split(",")+'], "beforeAction": [\n' + action_0 +'],"reward":"'+EvalString_3+'", "action": [\n' + action_1 + ']}\n'
|
||||||
return code;
|
return code;
|
||||||
*/;
|
*/;
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ maps.prototype._resetFloorImages = function () {
|
|||||||
maps.prototype._setHDCanvasSize = function (ctx, width, height) {
|
maps.prototype._setHDCanvasSize = function (ctx, width, height) {
|
||||||
if(main.replyChecking)return
|
if(main.replyChecking)return
|
||||||
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
||||||
var ratio = core.domStyle.scale;
|
var ratio = core.domStyle.ratio;
|
||||||
ratio *= devicePixelRatio;
|
ratio *= devicePixelRatio;
|
||||||
if (width != null) ctx.canvas.width = width * ratio;
|
if (width != null) ctx.canvas.width = width * ratio;
|
||||||
if (height != null) ctx.canvas.height = height * ratio;
|
if (height != null) ctx.canvas.height = height * ratio;
|
||||||
@ -1294,7 +1294,6 @@ maps.prototype.drawEvents = function (floorId, blocks, config) {
|
|||||||
}
|
}
|
||||||
var toDrawCtx = core.getContextByName(config.ctx);
|
var toDrawCtx = core.getContextByName(config.ctx);
|
||||||
if (!toDrawCtx) return;
|
if (!toDrawCtx) return;
|
||||||
|
|
||||||
var cacheCtx = toDrawCtx;
|
var cacheCtx = toDrawCtx;
|
||||||
if (config.onMap) {
|
if (config.onMap) {
|
||||||
cacheCtx = core.bigmap.cacheCanvas;
|
cacheCtx = core.bigmap.cacheCanvas;
|
||||||
@ -1332,6 +1331,7 @@ maps.prototype.drawEvents = function (floorId, blocks, config) {
|
|||||||
core.drawImage(toDrawCtx, cacheCtx.canvas, core.bigmap.v2 ? -32 : 0, core.bigmap.v2 ? -32 : 0);
|
core.drawImage(toDrawCtx, cacheCtx.canvas, core.bigmap.v2 ? -32 : 0, core.bigmap.v2 ? -32 : 0);
|
||||||
cacheCtx.translate(0, 0);
|
cacheCtx.translate(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////// 绘制前景层 //////
|
////// 绘制前景层 //////
|
||||||
@ -1773,7 +1773,6 @@ maps.prototype._drawThumbnail_drawTempCanvas = function (floorId, blocks, option
|
|||||||
flags = core.status.hero.flags;
|
flags = core.status.hero.flags;
|
||||||
core.status.hero.flags = options.flags;
|
core.status.hero.flags = options.flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._drawThumbnail_realDrawTempCanvas(floorId, blocks, options);
|
this._drawThumbnail_realDrawTempCanvas(floorId, blocks, options);
|
||||||
|
|
||||||
// --- 恢复 flags
|
// --- 恢复 flags
|
||||||
|
@ -12893,7 +12893,7 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
|
|||||||
1
|
1
|
||||||
],
|
],
|
||||||
"beforeAction": [],
|
"beforeAction": [],
|
||||||
"reward": "yellowKey:1,redGem:3",
|
"reward": "yellowKey:2,redGem:3",
|
||||||
"action": []
|
"action": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
{
|
{
|
||||||
"init": function () {
|
"init": function () {
|
||||||
this._afterLoadResources = function () {
|
this._afterLoadResources = function () {
|
||||||
|
core.canvas.event.canvas.style.filter = "drop-shadow(5px 5px 5px black)"
|
||||||
core.setTaskFloor = {}
|
core.setTaskFloor = {}
|
||||||
core.mitTaskFloor = {}
|
core.mitTaskFloor = {}
|
||||||
core.tarTaskFloor = {}
|
core.tarTaskFloor = {}
|
||||||
@ -11927,24 +11928,24 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
"text": "任务描述",
|
"text": "任务描述",
|
||||||
"n": 1,
|
"n": 1,
|
||||||
"info": [
|
"info": [
|
||||||
{ "type": "checkItem", "checkItem": "yellowKey", "operator": ">=", "count": 0 },
|
{ "type": "checkItem", "checkItem": "yellowKey", "operator": ">=", "count": 0 },
|
||||||
{ "type": "checkStatus", "checkStatus": "atk", "operator": ">=", "count": 10 },
|
{ "type": "checkStatus", "checkStatus": "atk", "operator": ">=", "count": 10 },
|
||||||
{ "type": "checkFlag", "checkFlag": "flag1", "operator": "=", "count": "\"value\"" },
|
{ "type": "checkFlag", "checkFlag": "flag1", "operator": "=", "count": "\"value\"" },
|
||||||
{ "type": "checkBlock", "checkBlock": "bat", "floorId": ["MT1", "MT2"], "operator": "<=", "count": 0 },
|
{ "type": "checkBlock", "checkBlock": "bat", "floorId": ["MT1", "MT2"], "operator": "<=", "count": 0 },
|
||||||
{ "type": "kill", "operator": ">=", "count": 0 },
|
{ "type": "kill", "operator": ">=", "count": 0 },
|
||||||
{
|
{
|
||||||
"type": "killLocs",
|
"type": "killLocs",
|
||||||
"loc": [
|
"loc": [
|
||||||
[1, 1]
|
[1, 1]
|
||||||
],
|
],
|
||||||
"floorId": "MT1",
|
"floorId": "MT1",
|
||||||
"operator": ">=",
|
"operator": ">=",
|
||||||
"count": 1
|
"count": 1
|
||||||
},
|
},
|
||||||
{ "type": "killSpecial", "killSpecial": "61", "floorId": ["MT1", "MT2"], "operator": ">=", "count": 1 },
|
{ "type": "killSpecial", "killSpecial": "61", "floorId": ["MT1", "MT2"], "operator": ">=", "count": 1 },
|
||||||
{ "type": "killAll", "floorId": ["MT1"] },
|
{ "type": "killAll", "floorId": ["MT1"] },
|
||||||
{ "type": "specialBlock", "floorId": ["MT1"], "specialBlock": "血网伤害", "operator": "<", "count": 1 },
|
{ "type": "specialBlock", "floorId": ["MT1"], "specialBlock": "血网伤害", "operator": "<", "count": 1 },
|
||||||
{ "type": "gosthFloor", "floorId": ["MT1"], "operator": "<", "count": 1 },
|
{ "type": "gosthFloor", "floorId": ["MT1"], "operator": "<", "count": 1 },
|
||||||
{ "type": "arrival", "floorId": "MT1" },
|
{ "type": "arrival", "floorId": "MT1" },
|
||||||
],
|
],
|
||||||
"setFloor": "MT1",
|
"setFloor": "MT1",
|
||||||
@ -28394,7 +28395,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
this.has = info.has ?? core.getRealStatus(this.checkStatus)
|
this.has = info.has ?? core.getRealStatus(this.checkStatus)
|
||||||
} else if (info.type === "checkFlag") {
|
} else if (info.type === "checkFlag") {
|
||||||
this.checkFlag = info.checkFlag
|
this.checkFlag = info.checkFlag
|
||||||
this.count = info.count
|
this.count = core.calValue(info.count)
|
||||||
this.operator = info.operator
|
this.operator = info.operator
|
||||||
this.has = info.has ?? core.getFlag(this.checkFlag)
|
this.has = info.has ?? core.getFlag(this.checkFlag)
|
||||||
} else if (info.type === "checkBlock") { //剩余图块
|
} else if (info.type === "checkBlock") { //剩余图块
|
||||||
@ -28422,7 +28423,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
this.has = info.has ?? 0
|
this.has = info.has ?? 0
|
||||||
this.operator = info.operator
|
this.operator = info.operator
|
||||||
} else if (info.type === "killAll") {
|
} else if (info.type === "killAll") {
|
||||||
this.floorId = info.floorId //楼层数组
|
this.floorId = core.calValue(info.floorId) //楼层数组
|
||||||
this.has = info.has ?? core.searchBlockWithFilter(block => block.event.cls.startsWith("enemy"), this.floorId).length
|
this.has = info.has ?? core.searchBlockWithFilter(block => block.event.cls.startsWith("enemy"), this.floorId).length
|
||||||
} else if (info.type === "specialBlock") { //踩雷
|
} else if (info.type === "specialBlock") { //踩雷
|
||||||
this.floorId = info.floorId //楼层数组,不填为任意楼层
|
this.floorId = info.floorId //楼层数组,不填为任意楼层
|
||||||
|
Loading…
Reference in New Issue
Block a user