changefloor current position

This commit is contained in:
oc 2019-04-13 22:11:08 +08:00
parent 8ec4b13afc
commit 822a0deb5b

View File

@ -228,7 +228,8 @@ default : [null,"MT1",null,0,0,null,500,null]
var toFloorId = IdString_0;
if (Floor_List_0!='floorId') toFloorId = Floor_List_0;
var loc = ', "loc": ['+Number_0+', '+Number_1+']';
if (Stair_List_0!=='loc')loc = ', "stair": "'+Stair_List_0+'"';
if (Stair_List_0==='now')loc = '';
else if (Stair_List_0!=='loc')loc = ', "stair": "'+Stair_List_0+'"';
DirectionEx_List_0 = DirectionEx_List_0 && (', "direction": "'+DirectionEx_List_0+'"');
Int_0 = (Int_0!=='') ?(', "time": '+Int_0):'';
Bool_0 = Bool_0 ?'':(', "ignoreChangeFloor": false');
@ -1982,8 +1983,8 @@ Floor_List
/*Floor_List ['floorId',':before',':next']*/;
Stair_List
: '坐标'|'上楼梯'|'下楼梯'
/*Stair_List ['loc','upFloor','downFloor']*/;
: '坐标'|'上楼梯'|'下楼梯'|'保持不变'
/*Stair_List ['loc','upFloor','downFloor','now']*/;
SetTextPosition_List
: '不改变'|'距离顶部'|'居中'|'距离底部'
@ -2167,7 +2168,10 @@ ActionParser.prototype.parse = function (obj,type) {
case 'changeFloor':
if(!obj)obj={};
if(!this.isset(obj.loc))obj.loc=[0,0];
if(!this.isset(obj.loc)) {
obj.loc=[0,0];
if (!this.isset(obj.stair)) obj.stair='now';
}
if (obj.floorId==':before'||obj.floorId==':next') {
obj.floorType=obj.floorId;
delete obj.floorId;