update _deltaTime calculate for editor (#7503)

This commit is contained in:
Knox
2020-10-13 19:09:31 +08:00
committed by GitHub
parent bc96749ac3
commit df196b3ded
+5 -1
View File
@@ -1000,9 +1000,13 @@ export class Director extends EventTarget {
}
else if (!this._invalid) {
// calculate "global" dt
if (!EDITOR || legacyCC.GAME_VIEW) {
if (EDITOR && !legacyCC.GAME_VIEW) {
this._deltaTime = time;
}
else {
this.calculateDeltaTime(time);
}
const dt = this._deltaTime;
// Update