feat: migrate JavaScript files to TypeScript, enhancing type safety and maintainability across the codebase

This commit is contained in:
Juan Sebastián Montoya 2026-01-06 21:51:00 -05:00
parent 3db2bb9160
commit c582f2004e
107 changed files with 5876 additions and 3588 deletions

View file

@ -0,0 +1,26 @@
import { Component } from '../core/Component.ts';
import { ComponentType } from '../core/Constants.ts';
/**
* Component for tracking entity velocity and movement speed limits.
*/
export class Velocity extends Component {
vx: number;
vy: number;
maxSpeed: number;
isLocked: boolean;
lockTimer: number;
/**
* @param vx - Initial X velocity
* @param vy - Initial Y velocity
*/
constructor(vx = 0, vy = 0) {
super(ComponentType.VELOCITY);
this.vx = vx;
this.vy = vy;
this.maxSpeed = 200;
this.isLocked = false;
this.lockTimer = 0;
}
}