From a96da8fbb457c0b6beab9b69a487eaa700e9eea5 Mon Sep 17 00:00:00 2001 From: Erik Onarheim Date: Thu, 5 Dec 2024 17:20:28 -0600 Subject: [PATCH] chore: more renames to remove units --- src/engine/Director/DefaultLoader.ts | 6 +++--- src/engine/Graphics/Animation.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/engine/Director/DefaultLoader.ts b/src/engine/Director/DefaultLoader.ts index f9da35296..1b9e24f5a 100644 --- a/src/engine/Director/DefaultLoader.ts +++ b/src/engine/Director/DefaultLoader.ts @@ -149,10 +149,10 @@ export class DefaultLoader implements Loadable[]> { /** * Optionally override the onUpdate * @param engine - * @param elapsedMilliseconds + * @param elapsed */ - onUpdate(engine: Engine, elapsedMilliseconds: number): void { - this._totalTimeMs += elapsedMilliseconds; + onUpdate(engine: Engine, elapsed: number): void { + this._totalTimeMs += elapsed; // override me } diff --git a/src/engine/Graphics/Animation.ts b/src/engine/Graphics/Animation.ts index 28703a472..f90801b0b 100644 --- a/src/engine/Graphics/Animation.ts +++ b/src/engine/Graphics/Animation.ts @@ -497,10 +497,10 @@ export class Animation extends Graphic implements HasTick { /** * Called internally by Excalibur to update the state of the animation potential update the current frame - * @param elapsedMilliseconds Milliseconds elapsed + * @param elapsed Milliseconds elapsed * @param idempotencyToken Prevents double ticking in a frame by passing a unique token to the frame */ - public tick(elapsedMilliseconds: number, idempotencyToken: number = 0): void { + public tick(elapsed: number, idempotencyToken: number = 0): void { if (this._idempotencyToken === idempotencyToken) { return; } @@ -515,7 +515,7 @@ export class Animation extends Graphic implements HasTick { this.events.emit('frame', { ...this.currentFrame, frameIndex: this.currentFrameIndex }); } - this._timeLeftInFrame -= elapsedMilliseconds * this._speed; + this._timeLeftInFrame -= elapsed * this._speed; if (this._timeLeftInFrame <= 0) { this.goToFrame(this._nextFrame()); }