set moveSpeed

This commit is contained in:
ckcz123 2019-04-20 20:46:27 +08:00
parent 3230fde958
commit fd1349a664
4 changed files with 22 additions and 7 deletions

View File

@ -1860,18 +1860,20 @@ actions.prototype._clickSwitchs = function (x, y) {
case 1: case 1:
return this._clickSwitchs_sound(); return this._clickSwitchs_sound();
case 2: case 2:
return this._clickSwitchs_displayEnemyDamage(); return this._clickSwitchs_moveSpeed();
case 3: case 3:
return this._clickSwitchs_displayCritical(); return this._clickSwitchs_displayEnemyDamage();
case 4: case 4:
return this._clickSwitchs_displayExtraDamage(); return this._clickSwitchs_displayCritical();
case 5: case 5:
return this._clickSwitchs_localForage(); return this._clickSwitchs_displayExtraDamage();
case 6: case 6:
return this._clickSwitchs_clickMove(); return this._clickSwitchs_localForage();
case 7: case 7:
return this._clickSwitchs_ExtendKeyboard(); return this._clickSwitchs_clickMove();
case 8: case 8:
return this._clickSwitchs_ExtendKeyboard();
case 9:
core.status.event.selection = 0; core.status.event.selection = 0;
core.ui.drawSettings(); core.ui.drawSettings();
break; break;
@ -1890,6 +1892,16 @@ actions.prototype._clickSwitchs_sound = function () {
core.ui.drawSwitchs(); core.ui.drawSwitchs();
} }
actions.prototype._clickSwitchs_moveSpeed = function () {
core.myprompt("请输入行走速度每走一步的时间单位毫秒默认100", core.values.moveSpeed, function (value) {
value = parseInt(value) || core.values.moveSpeed;
value = core.clamp(value, 10, 500);
core.values.moveSpeed = value;
core.setLocalStorage("moveSpeed", value);
core.ui.drawSwitchs();
});
}
actions.prototype._clickSwitchs_displayEnemyDamage = function () { actions.prototype._clickSwitchs_displayEnemyDamage = function () {
core.flags.displayEnemyDamage = !core.flags.displayEnemyDamage; core.flags.displayEnemyDamage = !core.flags.displayEnemyDamage;
core.updateDamage(); core.updateDamage();

View File

@ -1100,7 +1100,7 @@ control.prototype.speedUpReplay = function () {
else if (core.status.replay.speed==3) core.status.replay.speed=6; else if (core.status.replay.speed==3) core.status.replay.speed=6;
else if (core.status.replay.speed==2.5) core.status.replay.speed=3; else if (core.status.replay.speed==2.5) core.status.replay.speed=3;
else if (core.status.replay.speed==2) core.status.replay.speed=2.5; else if (core.status.replay.speed==2) core.status.replay.speed=2.5;
else { else if (core.status.replay.speed<2) {
core.status.replay.speed = parseInt(10*core.status.replay.speed + 2)/10; core.status.replay.speed = parseInt(10*core.status.replay.speed + 2)/10;
} }
core.drawTip("x"+core.status.replay.speed+"倍"); core.drawTip("x"+core.status.replay.speed+"倍");

View File

@ -252,6 +252,8 @@ core.prototype._init_sys_flags = function () {
core.flags.displayEnemyDamage = core.getLocalStorage('enemyDamage', core.flags.displayEnemyDamage); core.flags.displayEnemyDamage = core.getLocalStorage('enemyDamage', core.flags.displayEnemyDamage);
core.flags.displayCritical = core.getLocalStorage('critical', core.flags.displayCritical); core.flags.displayCritical = core.getLocalStorage('critical', core.flags.displayCritical);
core.flags.displayExtraDamage = core.getLocalStorage('extraDamage', core.flags.displayExtraDamage); core.flags.displayExtraDamage = core.getLocalStorage('extraDamage', core.flags.displayExtraDamage);
// 行走速度
core.values.moveSpeed = core.getLocalStorage('moveSpeed', core.values.moveSpeed);
} }
core.prototype._init_platform = function () { core.prototype._init_platform = function () {

View File

@ -1190,6 +1190,7 @@ ui.prototype.drawSwitchs = function() {
var choices = [ var choices = [
"背景音乐: "+(core.musicStatus.bgmStatus ? "[ON]" : "[OFF]"), "背景音乐: "+(core.musicStatus.bgmStatus ? "[ON]" : "[OFF]"),
"背景音效: "+(core.musicStatus.soundStatus ? "[ON]" : "[OFF]"), "背景音效: "+(core.musicStatus.soundStatus ? "[ON]" : "[OFF]"),
"行走速度: "+parseInt(core.values.moveSpeed),
"怪物显伤: "+(core.flags.displayEnemyDamage ? "[ON]" : "[OFF]"), "怪物显伤: "+(core.flags.displayEnemyDamage ? "[ON]" : "[OFF]"),
"临界显伤: "+(core.flags.displayCritical ? "[ON]" : "[OFF]"), "临界显伤: "+(core.flags.displayCritical ? "[ON]" : "[OFF]"),
"领域显伤: "+(core.flags.displayExtraDamage ? "[ON]" : "[OFF]"), "领域显伤: "+(core.flags.displayExtraDamage ? "[ON]" : "[OFF]"),