Skip to content

Commit

Permalink
chore: more renames to remove units
Browse files Browse the repository at this point in the history
  • Loading branch information
eonarheim committed Dec 5, 2024
1 parent 60f8c4b commit a96da8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/engine/Director/DefaultLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ export class DefaultLoader implements Loadable<Loadable<any>[]> {
/**
* 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
}

Expand Down
6 changes: 3 additions & 3 deletions src/engine/Graphics/Animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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());
}
Expand Down

0 comments on commit a96da8f

Please sign in to comment.