优化对称飞行器的用户体验
目的地会根据是否能飞显示绿/红框,再次按键或点击执行,从而使得使用飞时,不再需要仔细看位置
This commit is contained in:
parent
2461373ae3
commit
67666f4f09
@ -445,7 +445,9 @@ core.prototype.keyDown = function(keyCode) {
|
||||
core.status.usingCenterFly = false;
|
||||
} else {
|
||||
core.status.usingCenterFly = true;
|
||||
core.fillRect('ui',(12-core.getHeroLoc('x'))*32,(12-core.getHeroLoc('y'))*32,32,32,'rgba(0,255,0,0.5)');
|
||||
var fillstyle = 'rgba(255,0,0,0.5)';
|
||||
if (core.canUseItem('centerFly')) fillstyle = 'rgba(0,255,0,0.5)';
|
||||
core.fillRect('ui',(12-core.getHeroLoc('x'))*32,(12-core.getHeroLoc('y'))*32,32,32,fillstyle);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -459,7 +459,9 @@ events.prototype.useItem = function(itemId) {
|
||||
}
|
||||
if (itemId=='centerFly') {
|
||||
core.status.usingCenterFly= true;
|
||||
core.fillRect('ui',(12-core.getHeroLoc('x'))*32,(12-core.getHeroLoc('y'))*32,32,32,'rgba(0,255,0,0.5)');
|
||||
var fillstyle = 'rgba(255,0,0,0.5)';
|
||||
if (core.canUseItem('centerFly')) fillstyle = 'rgba(0,255,0,0.5)';
|
||||
core.fillRect('ui',(12-core.getHeroLoc('x'))*32,(12-core.getHeroLoc('y'))*32,32,32,fillstyle);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user