add a global canvas and remake difficuity choosing
@ -45,6 +45,7 @@
|
|||||||
</script>
|
</script>
|
||||||
<!-- injection -->
|
<!-- injection -->
|
||||||
<div id='gameGroup'>
|
<div id='gameGroup'>
|
||||||
|
<canvas id="whole" style="position: absolute; left: 0; top: 0; z-index: 68;"></canvas>
|
||||||
<p id='mainTips'>请稍候...</p>
|
<p id='mainTips'>请稍候...</p>
|
||||||
<img id='musicBtn'>
|
<img id='musicBtn'>
|
||||||
<div id='startPanel'>
|
<div id='startPanel'>
|
||||||
@ -142,7 +143,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 状态栏canvas化 -->
|
<!-- 状态栏canvas化 -->
|
||||||
<canvas id="statusCanvas" style="position: absolute; left: 0; top: 0; z-index: 100;"></canvas>
|
<canvas id="statusCanvas" style="position: absolute; left: 0; top: 0; z-index: 50;"></canvas>
|
||||||
<canvas id="caidan1" style="position: absolute; left: 0; top: 0;"></canvas>
|
<canvas id="caidan1" style="position: absolute; left: 0; top: 0;"></canvas>
|
||||||
</div>
|
</div>
|
||||||
<div id="toolBar" class="clearfix">
|
<div id="toolBar" class="clearfix">
|
||||||
|
@ -290,7 +290,8 @@ core.prototype.init = function (coreData, callback) {
|
|||||||
core.canvas[name].canvas.height = (b ? core.__PIXELS__ : core._PY_);
|
core.canvas[name].canvas.height = (b ? core.__PIXELS__ : core._PY_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
core.dom.whole.width = b ? core.__PIXELS__ : core._PX_ + Math.round(core._PX_ / 3);
|
||||||
|
core.dom.whole.height = b ? core.__PIXELS__ : core._PY_;
|
||||||
core.loader._load(function () {
|
core.loader._load(function () {
|
||||||
core.extensions._load(function () {
|
core.extensions._load(function () {
|
||||||
core._afterLoadResources(callback);
|
core._afterLoadResources(callback);
|
||||||
|
2
main.js
@ -75,6 +75,8 @@ function main () {
|
|||||||
'statusCanvasCtx': document.getElementById('statusCanvas').getContext('2d'),
|
'statusCanvasCtx': document.getElementById('statusCanvas').getContext('2d'),
|
||||||
'caidan1': document.getElementById('caidan1'),
|
'caidan1': document.getElementById('caidan1'),
|
||||||
'caidan1Ctx': document.getElementById('caidan1').getContext('2d'),
|
'caidan1Ctx': document.getElementById('caidan1').getContext('2d'),
|
||||||
|
'whole': document.getElementById('whole'),
|
||||||
|
'wholeCtx': document.getElementById('whole').getContext('2d'),
|
||||||
'inputDiv': document.getElementById('inputDiv'),
|
'inputDiv': document.getElementById('inputDiv'),
|
||||||
'inputMessage': document.getElementById('inputMessage'),
|
'inputMessage': document.getElementById('inputMessage'),
|
||||||
'inputBox': document.getElementById('inputBox'),
|
'inputBox': document.getElementById('inputBox'),
|
||||||
|
@ -9,8 +9,8 @@ main.floors.nandu=
|
|||||||
"images": [
|
"images": [
|
||||||
{
|
{
|
||||||
"name": "nanduxuanze.jpg",
|
"name": "nanduxuanze.jpg",
|
||||||
"canvas": "bg",
|
"canvas": "whole",
|
||||||
"x": -80,
|
"x": 0,
|
||||||
"y": 0
|
"y": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -22,6 +22,10 @@ main.floors.nandu=
|
|||||||
1
|
1
|
||||||
],
|
],
|
||||||
"firstArrive": [
|
"firstArrive": [
|
||||||
|
{
|
||||||
|
"type": "function",
|
||||||
|
"function": "function(){\ncontrol.prototype.hideStatusBar();\n}"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "trigger",
|
"type": "trigger",
|
||||||
"loc": [
|
"loc": [
|
||||||
@ -70,59 +74,13 @@ main.floors.nandu=
|
|||||||
"keep": true
|
"keep": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "showImage",
|
"type": "setValue",
|
||||||
"code": 1,
|
"name": "flag:hard",
|
||||||
"image": "easy.png",
|
"value": "1"
|
||||||
"loc": [
|
|
||||||
0,
|
|
||||||
64
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "showImage",
|
"type": "function",
|
||||||
"code": 2,
|
"function": "function(){\ncore.drawImage(core.dom.wholeCtx, core.material.images.images['nanduxuanze.jpg'], 0, 0);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 1 ? \"\" : \"an\") + 'easy.png'], -30, -55, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 2 ? \"\" : \"an\") + 'normal.png'], -30, 20, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 3 ? \"\" : \"an\") + 'hard.png'], -30, 95, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 4 ? \"\" : \"an\") + 'hell.png'], -30, 170, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 5 || flags.hard == 0 ? \"\" : \"an\") + 'cheating.png'], -30, 245, 710 * 0.6, 487 * 0.6);\n}"
|
||||||
"image": "anhard.png",
|
|
||||||
"loc": [
|
|
||||||
0,
|
|
||||||
192
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 3,
|
|
||||||
"image": "ancheating.png",
|
|
||||||
"loc": [
|
|
||||||
0,
|
|
||||||
320
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 4,
|
|
||||||
"image": "anhell.png",
|
|
||||||
"loc": [
|
|
||||||
0,
|
|
||||||
256
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 5,
|
|
||||||
"image": "annormal.png",
|
|
||||||
"loc": [
|
|
||||||
0,
|
|
||||||
128
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "showImage",
|
"type": "showImage",
|
||||||
@ -211,129 +169,8 @@ main.floors.nandu=
|
|||||||
],
|
],
|
||||||
"false": [
|
"false": [
|
||||||
{
|
{
|
||||||
"type": "if",
|
"type": "function",
|
||||||
"condition": "((flag:x<=3)&&(flag:y==2))",
|
"function": "function(){\nvar h = -1;\nif (flags.px <= 160 && flags.py >= 46 && flags.py <= 430) h = Math.floor((flags.py - 46) / 77) + 1;\nif (h > 0) {\n\tif (h == flags.hard) flags.xuanzhong = 1;\n\telse flags.hard = h;\n}\n}"
|
||||||
"true": [
|
|
||||||
{
|
|
||||||
"type": "if",
|
|
||||||
"condition": "(flag:hard==1)",
|
|
||||||
"true": [
|
|
||||||
{
|
|
||||||
"type": "setValue",
|
|
||||||
"name": "flag:xuanzhong",
|
|
||||||
"value": "1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"false": [
|
|
||||||
{
|
|
||||||
"type": "setValue",
|
|
||||||
"name": "flag:hard",
|
|
||||||
"value": "1"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"false": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "if",
|
|
||||||
"condition": "((flag:x<=3)&&(flag:y==4))",
|
|
||||||
"true": [
|
|
||||||
{
|
|
||||||
"type": "if",
|
|
||||||
"condition": "(flag:hard==2)",
|
|
||||||
"true": [
|
|
||||||
{
|
|
||||||
"type": "setValue",
|
|
||||||
"name": "flag:xuanzhong",
|
|
||||||
"value": "1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"false": [
|
|
||||||
{
|
|
||||||
"type": "setValue",
|
|
||||||
"name": "flag:hard",
|
|
||||||
"value": "2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"false": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "if",
|
|
||||||
"condition": "((flag:x<=3)&&(flag:y==6))",
|
|
||||||
"true": [
|
|
||||||
{
|
|
||||||
"type": "if",
|
|
||||||
"condition": "(flag:hard==3)",
|
|
||||||
"true": [
|
|
||||||
{
|
|
||||||
"type": "setValue",
|
|
||||||
"name": "flag:xuanzhong",
|
|
||||||
"value": "1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"false": [
|
|
||||||
{
|
|
||||||
"type": "setValue",
|
|
||||||
"name": "flag:hard",
|
|
||||||
"value": "3"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"false": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "if",
|
|
||||||
"condition": "((flag:x<=3)&&(flag:y==8))",
|
|
||||||
"true": [
|
|
||||||
{
|
|
||||||
"type": "if",
|
|
||||||
"condition": "(flag:hard==4)",
|
|
||||||
"true": [
|
|
||||||
{
|
|
||||||
"type": "setValue",
|
|
||||||
"name": "flag:xuanzhong",
|
|
||||||
"value": "1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"false": [
|
|
||||||
{
|
|
||||||
"type": "setValue",
|
|
||||||
"name": "flag:hard",
|
|
||||||
"value": "4"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"false": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "if",
|
|
||||||
"condition": "((flag:x<=3)&&(flag:y==10))",
|
|
||||||
"true": [
|
|
||||||
{
|
|
||||||
"type": "if",
|
|
||||||
"condition": "(flag:hard==5)",
|
|
||||||
"true": [
|
|
||||||
{
|
|
||||||
"type": "setValue",
|
|
||||||
"name": "flag:xuanzhong",
|
|
||||||
"value": "1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"false": [
|
|
||||||
{
|
|
||||||
"type": "setValue",
|
|
||||||
"name": "flag:hard",
|
|
||||||
"value": "5"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"false": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -367,219 +204,13 @@ main.floors.nandu=
|
|||||||
"true": [
|
"true": [
|
||||||
{
|
{
|
||||||
"type": "function",
|
"type": "function",
|
||||||
"function": "function(){\nswitch (core.getFlag(\"hard\")) {\ncase 1:\n\tcore.insertAction([{\n\t\t\"type\": \"choices\",\n\t\t\"text\": \"是否选择简单难度\",\n\t\t\"choices\": [{\n\t\t\t\t\"text\": \"是\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"break\" },\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"text\": \"否\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"setValue\", \"name\": \"flag:xuanzhong\", \"value\": \"0\" },\n\t\t\t\t]\n\t\t\t},\n\t\t]\n\t}, ])\n\tbreak;\n\ncase 2:\n\tcore.insertAction([{\n\t\t\"type\": \"choices\",\n\t\t\"text\": \"是否选择中等难度\",\n\t\t\"choices\": [{\n\t\t\t\t\"text\": \"是\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"break\" },\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"text\": \"否\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"setValue\", \"name\": \"flag:xuanzhong\", \"value\": \"0\" },\n\t\t\t\t]\n\t\t\t},\n\t\t]\n\t}, ])\n\tbreak;\ncase 3:\n\tcore.insertAction([{\n\t\t\"type\": \"choices\",\n\t\t\"text\": \"是否选择困难难度\",\n\t\t\"choices\": [{\n\t\t\t\t\"text\": \"是\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"break\" },\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"text\": \"否\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"setValue\", \"name\": \"flag:xuanzhong\", \"value\": \"0\" },\n\t\t\t\t]\n\t\t\t},\n\t\t]\n\t}, ])\n\tbreak;\ncase 4:\n\tcore.insertAction([{\n\t\t\"type\": \"choices\",\n\t\t\"text\": \"是否选择噩梦难度\",\n\t\t\"choices\": [{\n\t\t\t\t\"text\": \"是\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"break\" },\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"text\": \"否\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"setValue\", \"name\": \"flag:xuanzhong\", \"value\": \"0\" },\n\t\t\t\t]\n\t\t\t},\n\t\t]\n\t}, ])\n\tbreak;\ncase 5:\n\tcore.insertAction([{\n\t\t\"type\": \"choices\",\n\t\t\"text\": \"是否选择作弊难度\",\n\t\t\"choices\": [{\n\t\t\t\t\"text\": \"是\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"break\" },\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"text\": \"否\",\n\t\t\t\t\"action\": [\n\t\t\t\t\t{ \"type\": \"setValue\", \"name\": \"flag:xuanzhong\", \"value\": \"0\" },\n\t\t\t\t]\n\t\t\t},\n\t\t]\n\t}, ])\n\n\tbreak;\n\n\n}\n}"
|
"function": "function(){\ncore.insertAction([{\n\t\"type\": \"choices\",\n\t\"text\": \"是否选择\" + [\"作弊\", \"简单\", \"中等\", \"困难\", \"噩梦\", \"作弊\"][flags.hard] + \"难度\",\n\t\"choices\": [{\n\t\t\t\"text\": \"是\",\n\t\t\t\"action\": [\n\t\t\t\t{ \"type\": \"break\" },\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"text\": \"否\",\n\t\t\t\"action\": [\n\t\t\t\t{ \"type\": \"setValue\", \"name\": \"fla\" + \"g:xuanzhong\", \"value\": \"0\" },\n\t\t\t]\n\t\t},\n\t]\n}, ])\n}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"false": [
|
"false": [
|
||||||
{
|
{
|
||||||
"type": "hideImage",
|
"type": "function",
|
||||||
"code": 1,
|
"function": "function(){\ncore.drawImage(core.dom.wholeCtx, core.material.images.images['nanduxuanze.jpg'], 0, 0);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 1 ? \"\" : \"an\") + 'easy.png'], -30, -55, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 2 ? \"\" : \"an\") + 'normal.png'], -30, 20, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 3 ? \"\" : \"an\") + 'hard.png'], -30, 95, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 4 ? \"\" : \"an\") + 'hell.png'], -30, 170, 710 * 0.6, 487 * 0.6);\ncore.drawImage(core.dom.wholeCtx, core.material.images.images[(flags.hard == 5 || flags.hard == 0 ? \"\" : \"an\") + 'cheating.png'], -30, 245, 710 * 0.6, 487 * 0.6);\n\ncore.insertAction({ \"type\": \"showImage\", \"code\": 6, \"image\": [\"0cheating.png\", \"0easy.png\", \"0normal.png\", \"0hard.png\", \"0hell.png\", \"0cheating.png\"][flags.hard], \"loc\": [-160, 0], \"opacity\": 1, \"time\": 0 })\n}"
|
||||||
"time": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "if",
|
|
||||||
"condition": "(flag:hard==1)",
|
|
||||||
"true": [
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 6,
|
|
||||||
"image": "0easy.png",
|
|
||||||
"loc": [
|
|
||||||
-160,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 1,
|
|
||||||
"image": "easy.png",
|
|
||||||
"loc": [
|
|
||||||
0,
|
|
||||||
64
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"false": [
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 1,
|
|
||||||
"image": "aneasy.png",
|
|
||||||
"loc": [
|
|
||||||
0,
|
|
||||||
64
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "if",
|
|
||||||
"condition": "(flag:hard==2)",
|
|
||||||
"true": [
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 6,
|
|
||||||
"image": "0normal.png",
|
|
||||||
"loc": [
|
|
||||||
-160,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 2,
|
|
||||||
"image": "normal.png",
|
|
||||||
"loc": [
|
|
||||||
0,
|
|
||||||
128
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"false": [
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 2,
|
|
||||||
"image": "annormal.png",
|
|
||||||
"loc": [
|
|
||||||
0,
|
|
||||||
128
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "if",
|
|
||||||
"condition": "(flag:hard==3)",
|
|
||||||
"true": [
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 6,
|
|
||||||
"image": "0hard.png",
|
|
||||||
"loc": [
|
|
||||||
-160,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 3,
|
|
||||||
"image": "hard.png",
|
|
||||||
"loc": [
|
|
||||||
0,
|
|
||||||
192
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"false": [
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 3,
|
|
||||||
"image": "anhard.png",
|
|
||||||
"loc": [
|
|
||||||
0,
|
|
||||||
192
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "if",
|
|
||||||
"condition": "(flag:hard==4)",
|
|
||||||
"true": [
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 6,
|
|
||||||
"image": "0hell.png",
|
|
||||||
"loc": [
|
|
||||||
-160,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 4,
|
|
||||||
"image": "hell.png",
|
|
||||||
"loc": [
|
|
||||||
0,
|
|
||||||
256
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"false": [
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 4,
|
|
||||||
"image": "anhell.png",
|
|
||||||
"loc": [
|
|
||||||
0,
|
|
||||||
256
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "if",
|
|
||||||
"condition": "(flag:hard==5)",
|
|
||||||
"true": [
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 6,
|
|
||||||
"image": "0cheating.png",
|
|
||||||
"loc": [
|
|
||||||
-160,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 5,
|
|
||||||
"image": "cheating.png",
|
|
||||||
"loc": [
|
|
||||||
0,
|
|
||||||
320
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"false": [
|
|
||||||
{
|
|
||||||
"type": "showImage",
|
|
||||||
"code": 5,
|
|
||||||
"image": "ancheating.png",
|
|
||||||
"loc": [
|
|
||||||
0,
|
|
||||||
320
|
|
||||||
],
|
|
||||||
"opacity": 1,
|
|
||||||
"time": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -596,31 +227,6 @@ main.floors.nandu=
|
|||||||
"time": 0,
|
"time": 0,
|
||||||
"keep": true
|
"keep": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "hideImage",
|
|
||||||
"code": 1,
|
|
||||||
"time": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "hideImage",
|
|
||||||
"code": 2,
|
|
||||||
"time": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "hideImage",
|
|
||||||
"code": 3,
|
|
||||||
"time": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "hideImage",
|
|
||||||
"code": 4,
|
|
||||||
"time": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "hideImage",
|
|
||||||
"code": 5,
|
|
||||||
"time": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "hideImage",
|
"type": "hideImage",
|
||||||
"code": 6,
|
"code": 6,
|
||||||
@ -633,149 +239,8 @@ main.floors.nandu=
|
|||||||
"time": 20
|
"time": 20
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "switch",
|
"type": "function",
|
||||||
"condition": "flag:hard",
|
"function": "function(){\ncore.insertAction({ \"type\": \"setGlobalAttribute\", \"name\": \"statusLeftBackground\", \"value\": \"url(project/images/heng\" + flags.hard + \".png) 0 0/100% 100% no-repeat\" })\ncore.insertAction({ \"type\": \"setGlobalAttribute\", \"name\": \"toolsBackground\", \"value\": \"url(project/images/dibu\" + flags.hard + \".png) 0 0/100% 100% no-repeat\" })\ncore.insertAction({ \"type\": \"update\" });\nif (flags.hard != 3 && flags.hard != 4) core.insertAction({\n\t\"type\": \"setBlock\",\n\t\"number\": \"122\",\n\t\"loc\": [\n\t\t[5, 5]\n\t],\n\t\"floorId\": \"MT0\"\n})\nif (flags.hard == 2) core.insertAction({\n\t\"type\": \"setBlock\",\n\t\"number\": \"122\",\n\t\"loc\": [\n\t\t[5, 4]\n\t],\n\t\"floorId\": \"MT0\"\n})\nif (flags.hard == 0 || flags.hard == 5) core.status.hero.mdef += 800;\n}"
|
||||||
"caseList": [
|
|
||||||
{
|
|
||||||
"case": "1",
|
|
||||||
"action": [
|
|
||||||
{
|
|
||||||
"type": "setGlobalAttribute",
|
|
||||||
"name": "statusLeftBackground",
|
|
||||||
"value": "url(project/images/heng1.png) 0 0/100% 100% no-repeat"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "setGlobalAttribute",
|
|
||||||
"name": "toolsBackground",
|
|
||||||
"value": "url(project/images/dibu1.png) 0 0/100% 100% no-repeat"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "update"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "setBlock",
|
|
||||||
"number": "122",
|
|
||||||
"loc": [
|
|
||||||
[
|
|
||||||
5,
|
|
||||||
5
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"floorId": "MT0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"case": "2",
|
|
||||||
"action": [
|
|
||||||
{
|
|
||||||
"type": "setGlobalAttribute",
|
|
||||||
"name": "statusLeftBackground",
|
|
||||||
"value": "url(project/images/heng2.png) 0 0/100% 100% no-repeat"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "setGlobalAttribute",
|
|
||||||
"name": "toolsBackground",
|
|
||||||
"value": "url(project/images/dibu2.png) 0 0/100% 100% no-repeat"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "update"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "setBlock",
|
|
||||||
"number": "122",
|
|
||||||
"loc": [
|
|
||||||
[
|
|
||||||
5,
|
|
||||||
5
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"floorId": "MT0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "setBlock",
|
|
||||||
"number": "122",
|
|
||||||
"loc": [
|
|
||||||
[
|
|
||||||
5,
|
|
||||||
4
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"floorId": "MT0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"case": "3",
|
|
||||||
"action": [
|
|
||||||
{
|
|
||||||
"type": "setGlobalAttribute",
|
|
||||||
"name": "statusLeftBackground",
|
|
||||||
"value": "url(project/images/heng3.png) 0 0/100% 100% no-repeat"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "setGlobalAttribute",
|
|
||||||
"name": "toolsBackground",
|
|
||||||
"value": "url(project/images/dibu3.png) 0 0/100% 100% no-repeat"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "update"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"case": "4",
|
|
||||||
"action": [
|
|
||||||
{
|
|
||||||
"type": "setGlobalAttribute",
|
|
||||||
"name": "statusLeftBackground",
|
|
||||||
"value": "url(project/images/heng4.png) 0 0/100% 100% no-repeat"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "setGlobalAttribute",
|
|
||||||
"name": "toolsBackground",
|
|
||||||
"value": "url(project/images/dibu4.png) 0 0/100% 100% no-repeat"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "update"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"case": "5",
|
|
||||||
"action": [
|
|
||||||
{
|
|
||||||
"type": "setGlobalAttribute",
|
|
||||||
"name": "statusLeftBackground",
|
|
||||||
"value": "url(project/images/heng5.png) 0 0/100% 100% no-repeat"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "setGlobalAttribute",
|
|
||||||
"name": "toolsBackground",
|
|
||||||
"value": "url(project/images/dibu5.png) 0 0/100% 100% no-repeat"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "update"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "setBlock",
|
|
||||||
"number": "122",
|
|
||||||
"loc": [
|
|
||||||
[
|
|
||||||
5,
|
|
||||||
5
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"floorId": "MT0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "setValue",
|
|
||||||
"name": "status:mdef",
|
|
||||||
"value": "800"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "function",
|
"type": "function",
|
||||||
|
@ -1651,7 +1651,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
fill(core.itemCount('redKey'), 130, 280 + 52, '#E9967A');
|
fill(core.itemCount('redKey'), 130, 280 + 52, '#E9967A');
|
||||||
fill('黑钥匙', 55, 280 + 78, '#000000');
|
fill('黑钥匙', 55, 280 + 78, '#000000');
|
||||||
fill(core.itemCount('greenKey'), 130, 280 + 78, '#000000');
|
fill(core.itemCount('greenKey'), 130, 280 + 78, '#000000');
|
||||||
core.drawImage(ctx, core.material.images.images[['00005.png','00001.png','00002.png','00003.png','00004.png','00005.png'][flags.hard || 0]], 0, 423);
|
core.drawImage(ctx, core.material.images.images[['00005.png','00001.png','00002.png','00003.png','00004.png','00005.png'][flags.hard || 0]], 0, 423 - [0,10,10,0,0,0][flags.hard || 0]);
|
||||||
if (flags.poison) fill("中毒", 5, 60, '#00CD00');
|
if (flags.poison) fill("中毒", 5, 60, '#00CD00');
|
||||||
if (flags.weak) fill("衰弱", 50, 60, '#FF1493');
|
if (flags.weak) fill("衰弱", 50, 60, '#FF1493');
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 79 KiB |
@ -117,6 +117,48 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
core.dom.statusCanvas.style.display = core.flags.statusCanvas && !obj.extendToolbar ? "block" : "none";
|
core.dom.statusCanvas.style.display = core.flags.statusCanvas && !obj.extendToolbar ? "block" : "none";
|
||||||
}
|
}
|
||||||
core.registerResize("statusBar", core.control._resize_statusBar);
|
core.registerResize("statusBar", core.control._resize_statusBar);
|
||||||
|
core.control._resize_gameGroup = function (obj) {
|
||||||
|
var startBackground = core.domStyle.isVertical ? (main.styles.startVerticalBackground || main.styles.startBackground) : main.styles.startBackground;
|
||||||
|
if (main.dom.startBackground.getAttribute('__src__') != startBackground) {
|
||||||
|
main.dom.startBackground.setAttribute('__src__', startBackground);
|
||||||
|
main.dom.startBackground.src = startBackground;
|
||||||
|
}
|
||||||
|
|
||||||
|
var gameGroup = core.dom.gameGroup;
|
||||||
|
var totalWidth, totalHeight;
|
||||||
|
if (core.domStyle.isVertical) {
|
||||||
|
totalWidth = obj.outerWidth;
|
||||||
|
totalHeight = obj.outerHeight + obj.statusBarHeightInVertical + obj.toolbarHeightInVertical
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
totalWidth = obj.outerWidth + obj.BAR_WIDTH * core.domStyle.scale + (obj.extendToolbar ? 0 : obj.BORDER);
|
||||||
|
totalHeight = obj.outerHeight + (obj.extendToolbar ? obj.TOOLBAR_HEIGHT * core.domStyle.scale + obj.BORDER : 0);
|
||||||
|
}
|
||||||
|
gameGroup.style.width = totalWidth + "px";
|
||||||
|
gameGroup.style.height = totalHeight + "px";
|
||||||
|
gameGroup.style.left = (obj.clientWidth - totalWidth) / 2 + "px";
|
||||||
|
gameGroup.style.top = (obj.clientHeight - totalHeight) / 2 + "px";
|
||||||
|
var whole = core.dom.whole;
|
||||||
|
whole.style.width = totalWidth + "px";
|
||||||
|
whole.style.height = totalHeight + "px";
|
||||||
|
// floorMsgGroup
|
||||||
|
var floorMsgGroup = core.dom.floorMsgGroup;
|
||||||
|
floorMsgGroup.style = obj.globalAttribute.floorChangingStyle;
|
||||||
|
floorMsgGroup.style.width = obj.outerWidth - 2 * obj.BORDER + "px";
|
||||||
|
floorMsgGroup.style.height = totalHeight - 2 * obj.BORDER + "px";
|
||||||
|
floorMsgGroup.style.fontSize = 16 * core.domStyle.scale + "px";
|
||||||
|
// startPanel
|
||||||
|
core.dom.startPanel.style.fontSize = 16 * core.domStyle.scale + "px";
|
||||||
|
// musicBtn
|
||||||
|
if (core.domStyle.isVertical || core.domStyle.scale < 1) {
|
||||||
|
core.dom.musicBtn.style.right = core.dom.musicBtn.style.bottom = "3px";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
core.dom.musicBtn.style.right = (obj.clientWidth - totalWidth) / 2 + "px";
|
||||||
|
core.dom.musicBtn.style.bottom = (obj.clientHeight - totalHeight) / 2 - 27 + "px";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
core.registerResize("gameGroup", core.control._resize_gameGroup);
|
||||||
core.maps._drawThumbnail_realDrawTempCanvas = function (floorId, blocks, options) {
|
core.maps._drawThumbnail_realDrawTempCanvas = function (floorId, blocks, options) {
|
||||||
// 缩略图:背景
|
// 缩略图:背景
|
||||||
this.drawBg(floorId, options);
|
this.drawBg(floorId, options);
|
||||||
@ -142,6 +184,45 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
core.control.updateDamage(floorId, options.ctx);
|
core.control.updateDamage(floorId, options.ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
core.maps._drawMap_drawAll = function (floorId, config) {
|
||||||
|
floorId = floorId || core.status.floorId;
|
||||||
|
this.drawBg(floorId, config);
|
||||||
|
this.drawEvents(floorId);
|
||||||
|
this.drawFg(floorId, config);
|
||||||
|
if (floorId == "nandu") {
|
||||||
|
core.maps._drawFloorImages(floorId, core.dom.wholeCtx, 'whole', null, null, (config || {}).onMap);
|
||||||
|
}
|
||||||
|
else core.dom.wholeCtx.clearRect(0, 0, core.dom.whole.width, core.dom.whole.height);
|
||||||
|
}
|
||||||
|
core.control._animationFrame_globalAnimate = function (timestamp) {
|
||||||
|
if (timestamp - core.animateFrame.globalTime <= core.values.animateSpeed) return;
|
||||||
|
core.status.globalAnimateStatus++;
|
||||||
|
if (core.status.floorId) {
|
||||||
|
// Global Animate
|
||||||
|
core.status.globalAnimateObjs.forEach(function (block) {
|
||||||
|
core.drawBlock(block, core.status.globalAnimateStatus);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Global floor images
|
||||||
|
core.maps._drawFloorImages(core.status.floorId, core.canvas.bg, 'bg', core.status.floorAnimateObjs || [], core.status.globalAnimateStatus);
|
||||||
|
core.maps._drawFloorImages(core.status.floorId, core.canvas.fg, 'fg', core.status.floorAnimateObjs || [], core.status.globalAnimateStatus);
|
||||||
|
core.maps._drawFloorImages(core.status.floorId, core.dom.wholeCtx, 'whole', core.status.floorAnimateObjs || [], core.status.globalAnimateStatus);
|
||||||
|
|
||||||
|
// Global Autotile Animate
|
||||||
|
core.status.autotileAnimateObjs.forEach(function (block) {
|
||||||
|
core.maps._drawAutotileAnimate(block, core.status.globalAnimateStatus);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Global hero animate
|
||||||
|
if ((core.status.hero || {}).animate && core.status.heroMoving == 0 && main.mode == 'play' && !core.status.preview.enabled) {
|
||||||
|
core.drawHero('stop', null, core.status.globalAnimateStatus);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Box animate
|
||||||
|
core.drawBoxAnimate();
|
||||||
|
core.animateFrame.globalTime = timestamp;
|
||||||
|
}
|
||||||
|
core.control.registerAnimationFrame("globalAnimate", true, core.control._animationFrame_globalAnimate);
|
||||||
},
|
},
|
||||||
"drawLight": function () {
|
"drawLight": function () {
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
html, body {
|
html, body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -201,7 +201,7 @@
|
|||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
background: url(project/materials/ground.png) repeat;
|
background: url(project/materials/ground.png) repeat;
|
||||||
z-index: 185;
|
/*z-index: 185;*/
|
||||||
display: none;
|
display: none;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@ -296,7 +296,7 @@ p#name {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
background: #000000;
|
background: #000000;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
z-index: 185;
|
/*z-index: 185;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
#bg {
|
#bg {
|
||||||
|