设置开门时间
This commit is contained in:
parent
53b95ab199
commit
b45afe0ae4
@ -338,7 +338,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"_leaf": true,
|
||||
"_type": "textarea",
|
||||
"_docs": "门信息",
|
||||
"_data": "该图块的门信息,是一个三元数组。\n第一项为所需要的钥匙信息,第二项为开此门时的音效,第三项为关此门时的音效。仅对animates生效。"
|
||||
"_data": "该图块的门信息,是一个四元数组。\n第一项为所需要的钥匙信息,第二项为开关门的毫秒数,第三项为开此门时的音效,第四项为关此门时的音效。仅对animates生效。"
|
||||
},
|
||||
"faceIds": {
|
||||
"_leaf": true,
|
||||
|
||||
@ -487,7 +487,7 @@ events.prototype._openDoor_check = function (id, x, y, needKey) {
|
||||
core.removeItem(keyName, keyInfo[keyName]);
|
||||
}
|
||||
}
|
||||
core.playSound(doorInfo[1] || 'door.mp3');
|
||||
core.playSound(doorInfo[2] || 'door.mp3');
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -495,7 +495,7 @@ events.prototype._openDoor_animate = function (id, x, y, callback) {
|
||||
var blockInfo = core.getBlockInfo(id);
|
||||
var image = blockInfo.image, posY = blockInfo.posY, height = blockInfo.height;
|
||||
|
||||
var speed = 40;
|
||||
var speed = (core.getBlockById(id).event.doorInfo[1] || 160) / 4;
|
||||
|
||||
var locked = core.status.lockControl;
|
||||
core.lockControl();
|
||||
@ -2611,11 +2611,11 @@ events.prototype.closeDoor = function (x, y, id, callback) {
|
||||
}
|
||||
|
||||
// 关门动画
|
||||
core.playSound(doorInfo[2] || 'door.mp3');
|
||||
core.playSound(doorInfo[3] || 'door.mp3');
|
||||
var blockInfo = core.getBlockInfo(id);
|
||||
var image = blockInfo.image, posY = blockInfo.posY, height = blockInfo.height;
|
||||
|
||||
var speed = 40, state = 0;
|
||||
var speed = (doorInfo[1] || 160) / 4, state = 0;
|
||||
var animate = window.setInterval(function () {
|
||||
state++;
|
||||
if (state == 4) {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
|
||||
{
|
||||
"1": {"cls":"animates","id":"yellowWall","canBreak":true,"animate":1,"doorInfo":[null,"door.mp3","door.mp3"]},
|
||||
"2": {"cls":"animates","id":"whiteWall","canBreak":true,"animate":1,"doorInfo":[null,"door.mp3","door.mp3"]},
|
||||
"3": {"cls":"animates","id":"blueWall","canBreak":true,"animate":1,"doorInfo":[null,"door.mp3","door.mp3"]},
|
||||
"1": {"cls":"animates","id":"yellowWall","canBreak":true,"animate":1,"doorInfo":[null,160,"door.mp3","door.mp3"]},
|
||||
"2": {"cls":"animates","id":"whiteWall","canBreak":true,"animate":1,"doorInfo":[null,160,"door.mp3","door.mp3"]},
|
||||
"3": {"cls":"animates","id":"blueWall","canBreak":true,"animate":1,"doorInfo":[null,160,"door.mp3","door.mp3"]},
|
||||
"4": {"cls":"animates","id":"star","name":"星空"},
|
||||
"5": {"cls":"animates","id":"lava","name":"岩浆"},
|
||||
"6": {"cls":"terrains","id":"ice"},
|
||||
@ -68,12 +68,12 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
|
||||
"71": {"cls":"items","id":"shield0"},
|
||||
"72": {"cls":"items","id":"skill1"},
|
||||
"73": {"cls":"items","id":"wand"},
|
||||
"81": {"cls":"animates","id":"yellowDoor","trigger":"openDoor","animate":1,"doorInfo":[{"yellowKey":1},"door.mp3","door.mp3"],"name":"黄门"},
|
||||
"82": {"cls":"animates","id":"blueDoor","trigger":"openDoor","animate":1,"doorInfo":[{"blueKey":1},"door.mp3","door.mp3"],"name":"蓝门"},
|
||||
"83": {"cls":"animates","id":"redDoor","trigger":"openDoor","animate":1,"doorInfo":[{"redKey":1},"door.mp3","door.mp3"],"name":"红门"},
|
||||
"84": {"cls":"animates","id":"greenDoor","trigger":"openDoor","animate":1,"doorInfo":[{"greenKey":1},"door.mp3","door.mp3"],"name":"绿门"},
|
||||
"85": {"cls":"animates","id":"specialDoor","trigger":"openDoor","animate":1,"doorInfo":[null,"door.mp3","door.mp3"],"name":"机关门"},
|
||||
"86": {"cls":"animates","id":"steelDoor","trigger":"openDoor","animate":1,"doorInfo":[{"steelKey":1},"door.mp3","door.mp3"],"name":"铁门"},
|
||||
"81": {"cls":"animates","id":"yellowDoor","trigger":"openDoor","animate":1,"doorInfo":[{"yellowKey":1},160,"door.mp3","door.mp3"],"name":"黄门"},
|
||||
"82": {"cls":"animates","id":"blueDoor","trigger":"openDoor","animate":1,"doorInfo":[{"blueKey":1},160,"door.mp3","door.mp3"],"name":"蓝门"},
|
||||
"83": {"cls":"animates","id":"redDoor","trigger":"openDoor","animate":1,"doorInfo":[{"redKey":1},160,"door.mp3","door.mp3"],"name":"红门"},
|
||||
"84": {"cls":"animates","id":"greenDoor","trigger":"openDoor","animate":1,"doorInfo":[{"greenKey":1},160,"door.mp3","door.mp3"],"name":"绿门"},
|
||||
"85": {"cls":"animates","id":"specialDoor","trigger":"openDoor","animate":1,"doorInfo":[null,160,"door.mp3","door.mp3"],"name":"机关门"},
|
||||
"86": {"cls":"animates","id":"steelDoor","trigger":"openDoor","animate":1,"doorInfo":[{"steelKey":1},160,"door.mp3","door.mp3"],"name":"铁门"},
|
||||
"87": {"cls":"terrains","id":"upFloor","canPass":true},
|
||||
"88": {"cls":"terrains","id":"downFloor","canPass":true},
|
||||
"89": {"cls":"animates","id":"portal","canPass":true},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user