setSpeed replay

This commit is contained in:
oc 2018-10-13 14:35:36 +08:00
parent d8086f31eb
commit f135213df7
4 changed files with 31 additions and 4 deletions

View File

@ -51,6 +51,12 @@ actions.prototype.onkeyUp = function(e) {
core.bookReplay();
else if (e.keyCode==33||e.keyCode==34)
core.viewMapReplay();
else if ((e.keyCode>=49 && e.keyCode<=51) || e.keyCode==54) // 1,2,3,6
core.setReplaySpeed(e.keyCode-48);
else if (e.keyCode==52)
core.setReplaySpeed(3.9);
else if (e.keyCode==53)
core.setReplaySpeed(5.1);
return;
}
@ -179,7 +185,7 @@ actions.prototype.keyDown = function(keyCode) {
}
////// 根据放开键的code来执行一系列操作 //////
actions.prototype.keyUp = function(keyCode, fromReplay) {
actions.prototype.keyUp = function(keyCode) {
if (core.isset(core.status.replay)&&core.status.replay.replaying
&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0&&core.status.event.id!='viewMaps') return;
@ -677,10 +683,16 @@ actions.prototype.onclick = function (x, y, stepPostfix) {
////// 滑动鼠标滚轮时的操作 //////
actions.prototype.onmousewheel = function (direct) {
if (core.isset(core.status.replay)&&core.status.replay.replaying
&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0&&core.status.event.id!='viewMaps') return;
// 向下滚动是 -1 ,向上是 1
if (core.isset(core.status.replay)&&core.status.replay.replaying
&&core.status.event.id!='save'&&(core.status.event.id||"").indexOf('book')!=0&&core.status.event.id!='viewMaps') {
// 滚轮控制速度
if (direct==1) core.speedUpReplay();
if (direct==-1) core.speedDownReplay();
return;
}
// 楼层飞行器
if (core.status.lockControl && core.status.event.id == 'fly') {
if (direct==1) core.ui.drawFly(core.status.event.data+1);

View File

@ -1698,6 +1698,14 @@ control.prototype.speedDownReplay = function () {
core.drawTip("x"+core.status.replay.speed+"倍");
}
////// 设置播放速度 //////
control.prototype.setReplaySpeed = function (speed) {
if (core.status.event.id=='save' || (core.status.event.id||"").indexOf('book')==0 || core.status.event.id=='viewMaps') return;
if (!core.status.replay.replaying) return;
core.status.replay.speed = speed;
core.drawTip("x"+core.status.replay.speed+"倍");
}
////// 停止播放 //////
control.prototype.stopReplay = function () {
if (core.status.event.id=='save' || (core.status.event.id||"").indexOf('book')==0 || core.status.event.id=='viewMaps') return;

View File

@ -1065,6 +1065,11 @@ core.prototype.speedDownReplay = function () {
core.control.speedDownReplay();
}
////// 设置播放速度 //////
core.prototype.setReplaySpeed = function (speed) {
core.control.setReplaySpeed(speed);
}
////// 回退播放 //////
core.prototype.rewindReplay = function () {
core.control.rewindReplay();

View File

@ -1,12 +1,14 @@
HTML5魔塔样板V2.4.3
增加光环属性
并行事件处理
增加光环属性,还可以制作区域光环效果
将部分代码移动到脚本编辑中
(怪物属性获取、楼层传送、数据统计等)
事件改变天气或画面色调,读档后仍有效
Autotile注册优化
状态栏可以显示角色名字
双击道具栏图标直接进入装备栏
播放录像时1-6快速设置播放速度滚轮加减速
修复大地图的夹击Bug
iOS设备默认关闭新版存档
部分其他细节优化