editor.changeFloor
This commit is contained in:
parent
5671d5501e
commit
4659f4ddcd
@ -184,6 +184,9 @@ body{
|
|||||||
top: 5px;
|
top: 5px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
.egameCanvas {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
.gameCanvas {
|
.gameCanvas {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
<div class="map" id="mapEdit">
|
<div class="map" id="mapEdit">
|
||||||
<canvas class='gameCanvas' id='bg' width='416' height='416' style='z-index:1'></canvas>
|
<canvas class='gameCanvas' id='bg' width='416' height='416' style='z-index:1'></canvas>
|
||||||
<canvas class='gameCanvas' id='event' width='416' height='416' style='z-index:2'></canvas>
|
<canvas class='gameCanvas' id='event' width='416' height='416' style='z-index:2'></canvas>
|
||||||
<canvas class='gameCanvas' id='eui' width='416' height='416' style='z-index:100'></canvas>
|
<canvas class='egameCanvas' id='eui' width='416' height='416' style='z-index:100'></canvas>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<div id="tip" v-cloak >
|
<div id="tip" v-cloak >
|
||||||
@ -70,7 +70,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="right">
|
<div id="right">
|
||||||
<div id="iconLib">
|
<div id="iconLib">
|
||||||
<canvas class='gameCanvas' id='edata' width='416' height='416' style='z-index:0'></canvas>
|
<canvas class='egameCanvas' id='edata' width='416' height='416' style='z-index:0'></canvas>
|
||||||
<div id="selectBox">
|
<div id="selectBox">
|
||||||
<div id='dataSelection' v-show="isSelected" v-cloak></div>
|
<div id='dataSelection' v-show="isSelected" v-cloak></div>
|
||||||
</div>
|
</div>
|
||||||
@ -262,6 +262,7 @@ editor.prototype.idsInit = function(maps, icons){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
editor.indexs[0]=[0];
|
||||||
}
|
}
|
||||||
editor.prototype.drawInitData = function (icons) {
|
editor.prototype.drawInitData = function (icons) {
|
||||||
var ratio=1;
|
var ratio=1;
|
||||||
@ -337,7 +338,7 @@ editor.prototype.mapInit = function(){
|
|||||||
}
|
}
|
||||||
editor.prototype.drawMapBg = function(img){
|
editor.prototype.drawMapBg = function(img){
|
||||||
var bgc = bg.getContext('2d');
|
var bgc = bg.getContext('2d');
|
||||||
if (editor.bgY == 0){
|
if (!core.isset(editor.bgY) || editor.bgY == 0){
|
||||||
editor.main.editor.drawMapBg();
|
editor.main.editor.drawMapBg();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -684,14 +685,33 @@ editor.info
|
|||||||
始终是最后一次点击的结果
|
始终是最后一次点击的结果
|
||||||
注意editor.info可能因为点击其他地方而被清空
|
注意editor.info可能因为点击其他地方而被清空
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
editor = new editor();
|
editor = new editor();
|
||||||
main.init('editor');
|
main.init('editor');
|
||||||
|
editor.changeFloor = function(floorId,callback) {
|
||||||
|
core.changeFloor(floorId, null, core.firstData.hero.loc, null, function(){
|
||||||
|
editor.drawMapBg();
|
||||||
|
var mapArray = core.maps.getMapArray(core.status.maps, core.status.floorId);
|
||||||
|
editor.map = mapArray.map(function(v){return v.map(function(v){return editor.ids[[editor.indexs[v][0]]]})});
|
||||||
|
editor.updateMap();
|
||||||
|
if (core.isset(callback))callback();
|
||||||
|
});
|
||||||
|
}
|
||||||
//main.listen();
|
//main.listen();
|
||||||
var afterMainInit = function(){
|
var afterMainInit = function(){
|
||||||
|
|
||||||
main.editor.disableGlobalAnimate=false;
|
main.editor.disableGlobalAnimate=false;
|
||||||
//core.status.maps = core.clone(core.maps.initMaps(floorIds));
|
//core.status.maps = core.clone(core.maps.initMaps(floorIds));
|
||||||
editor.init(editor.updateMap);
|
editor.init(function(){
|
||||||
|
//core.changeFloor('sample1')
|
||||||
|
//editor.drawMapBg()
|
||||||
|
var mapArray = core.maps.getMapArray(core.status.maps, core.status.floorId);
|
||||||
|
editor.map = mapArray.map(function(v){return v.map(function(v){return editor.ids[[editor.indexs[v][0]]]})});
|
||||||
|
editor.updateMap();
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
var startgame = function(){
|
var startgame = function(){
|
||||||
var hard = 'Hard';
|
var hard = 'Hard';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user