setSpeed replay
This commit is contained in:
parent
d8086f31eb
commit
f135213df7
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user