From fdc0b14c3a39cc000d2b652ca1d4570106fbc382 Mon Sep 17 00:00:00 2001 From: oc Date: Mon, 18 Jun 2018 20:54:27 +0800 Subject: [PATCH] Fix ChangeFloor Time --- docs/event.md | 2 +- libs/events.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/event.md b/docs/event.md index 3eb4023c..a1ccef79 100644 --- a/docs/event.md +++ b/docs/event.md @@ -591,7 +591,7 @@ direction为可选的,指定的话将使勇士的朝向变成该方向 time为可选的,指定的话将作为楼层切换动画的时间。 -**time也可以置为0,如果为0则没有楼层切换动画。** +**如果time指定为小于100,则视为没有楼层切换动画。** !> **changeFloor到达一个新的楼层,将不会执行firstArrive事件!如有需求请在到达点设置自定义事件,然后使用type: trigger立刻调用之。** diff --git a/libs/events.js b/libs/events.js index c60a3914..03cee5e1 100644 --- a/libs/events.js +++ b/libs/events.js @@ -1001,7 +1001,7 @@ events.prototype.changeFloor = function (floorId, stair, heroLoc, time, callback else floorId=core.status.floorId; } - var displayAnimate=!(time==0) && !core.status.replay.replaying; + var displayAnimate=(!core.isset(time) || time>=100) && !core.status.replay.replaying; time = time || 800; time /= 20;