globalAnimate Speed

This commit is contained in:
oc 2019-01-09 00:01:01 +08:00
parent 3732f6e493
commit 05a87f07fd
3 changed files with 1 additions and 5 deletions

View File

@ -44,8 +44,6 @@ control.prototype.setRequestAnimationFrame = function () {
} }
}()); }());
core.animateFrame.speed = core.values.animateSpeed;
var draw = function(timestamp) { var draw = function(timestamp) {
// move time // move time
@ -57,7 +55,7 @@ control.prototype.setRequestAnimationFrame = function () {
} }
// Global Animate // Global Animate
if (timestamp - core.animateFrame.globalTime > core.animateFrame.speed && core.isPlaying()) { if (timestamp - core.animateFrame.globalTime > core.values.animateSpeed && core.isPlaying()) {
core.status.globalAnimateStatus++; core.status.globalAnimateStatus++;

View File

@ -36,7 +36,6 @@ function core() {
'moveTime': 0, 'moveTime': 0,
'lastLegTime': 0, 'lastLegTime': 0,
'leftLeg': true, 'leftLeg': true,
'speed': null,
'weather': { 'weather': {
'time': 0, 'time': 0,
'type': null, 'type': null,

View File

@ -1364,7 +1364,6 @@ maps.prototype.removeGlobalAnimate = function (x, y, all, name) {
maps.prototype.setGlobalAnimate = function (speed) { maps.prototype.setGlobalAnimate = function (speed) {
if (main.mode=='editor' && main.editor.disableGlobalAnimate) return; if (main.mode=='editor' && main.editor.disableGlobalAnimate) return;
core.status.globalAnimateStatus = 0; core.status.globalAnimateStatus = 0;
core.animateFrame.speed = speed;
core.animateFrame.globalAnimate = true; core.animateFrame.globalAnimate = true;
} }