fix turn
This commit is contained in:
parent
bf4c63a514
commit
742f2c9fb0
@ -4062,7 +4062,7 @@ Direction_List
|
||||
/*Direction_List ['up','down','left','right']*/;
|
||||
|
||||
DirectionEx_List
|
||||
: '不变'|'朝上'|'朝下'|'朝左'|'朝右'|'左转'|'右转'|'背对'|'面对角色'|'背对角色'
|
||||
: '不变'|'朝上'|'朝下'|'朝左'|'朝右'|'左转'|'右转'|'背对'|'角色同向'|'角色反向'
|
||||
/*DirectionEx_List ['null','up','down','left','right',':left',':right',':back',':hero',':backhero']*/;
|
||||
|
||||
StepString
|
||||
|
||||
@ -864,8 +864,8 @@ utils.prototype.turnDirection = function (turn, direction) {
|
||||
direction = direction || core.getHeroLoc('direction');
|
||||
var directionList = ["left", "leftup", "up", "rightup", "right", "rightdown", "down", "leftdown"];
|
||||
if (directionList.indexOf(turn) >= 0) return turn;
|
||||
if (turn == ':hero') return this.turnDirection(':back', core.getHeroLoc('direction'));
|
||||
if (turn == ':backhero') return core.getHeroLoc('direction');
|
||||
if (turn == ':hero') return core.getHeroLoc('direction');
|
||||
if (turn == ':backhero') return this.turnDirection(':back', core.getHeroLoc('direction'));
|
||||
if (typeof turn === 'number' && turn % 45 == 0) turn /= 45;
|
||||
else {
|
||||
switch (turn) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user