diff --git a/cocos/root.ts b/cocos/root.ts index 5dea025dbe4..269249cb178 100644 --- a/cocos/root.ts +++ b/cocos/root.ts @@ -207,9 +207,6 @@ export class Root { public set fixedFPS (fps: number) { if (fps > 0) { this._fixedFPS$ = fps; - this._fixedFPSFrameTime = 1000.0 / fps; - } else { - this._fixedFPSFrameTime = 0; } } @@ -469,17 +466,6 @@ export class Root { public frameMove (deltaTime: number): void { this._frameTime$ = deltaTime; - /* - if (this._fixedFPSFrameTime > 0) { - - const elapsed = this._frameTime * 1000.0; - if (this._fixedFPSFrameTime > elapsed) { - - setTimeout(function () {}, this._fixedFPSFrameTime - elapsed); - } - } - */ - ++this._frameCount$; this._cumulativeTime$ += deltaTime; this._fpsTime$ += deltaTime; diff --git a/cocos/tween/actions/action-manager.ts b/cocos/tween/actions/action-manager.ts index b2257125af9..e2c98d44238 100644 --- a/cocos/tween/actions/action-manager.ts +++ b/cocos/tween/actions/action-manager.ts @@ -26,7 +26,7 @@ */ import { errorID, logID } from '../../core/platform/debug'; -import { Action } from './action'; +import { Action, ActionEnum } from './action'; import { isCCObject } from '../../core/data/object'; import { Node, NodeEventType } from '../../scene-graph'; @@ -267,7 +267,7 @@ export class ActionManager { * @param {T} target */ removeActionByTag (tag: number, target?: T): void { - if (tag === Action.TAG_INVALID) logID(1002); + if (tag === ActionEnum.TAG_INVALID) logID(1002); const hashTargets = this._hashTargets; if (target) { @@ -290,7 +290,7 @@ export class ActionManager { * @param {T} target */ removeAllActionsByTag (tag: number, target?: T): void { - if (tag === Action.TAG_INVALID) logID(1002); + if (tag === ActionEnum.TAG_INVALID) logID(1002); const hashTargets = this._hashTargets; if (target) { @@ -314,7 +314,7 @@ export class ActionManager { * @return {Action|null} return the Action with the given tag on success */ getActionByTag (tag: number, target: T): Action | null { - if (tag === Action.TAG_INVALID) logID(1004); + if (tag === ActionEnum.TAG_INVALID) logID(1004); const element = this._hashTargets.get(target); if (element) {