From aed2806e9db366ebb65693ab1841345629f65698 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 18 Nov 2024 17:16:49 +0800 Subject: [PATCH] Type cleanup in particle-system-2d.ts --- cocos/particle-2d/particle-system-2d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cocos/particle-2d/particle-system-2d.ts b/cocos/particle-2d/particle-system-2d.ts index 2b40985c812..6562f9eb141 100644 --- a/cocos/particle-2d/particle-system-2d.ts +++ b/cocos/particle-2d/particle-system-2d.ts @@ -740,9 +740,9 @@ export class ParticleSystem2D extends UIRenderer { private _positionType = PositionType.FREE; private _stopped = true; - private declare _previewTimer; + private declare _previewTimer: number | null; private declare _focused: boolean; - private declare _plistFile; + private declare _plistFile: string; private declare _tiffReader; private _useFile: boolean; @@ -849,7 +849,7 @@ export class ParticleSystem2D extends UIRenderer { } } - protected lateUpdate (dt): void { + protected lateUpdate (dt: number): void { if (!this._simulator.finished) { this._simulator.step(dt); } @@ -967,7 +967,7 @@ export class ParticleSystem2D extends UIRenderer { } }); } else if (dict.textureImageData) { - const textureData = dict.textureImageData; + const textureData = dict.textureImageData as string; if (textureData && textureData.length > 0) { let imgPathName = imgPath;