diff --git a/lib/index.d.ts b/lib/index.d.ts index 177310c..17c1ae5 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -604,6 +604,20 @@ interface NumericalEntity {pos: Coordinates, w: number, h: number} interface NumericalEntityWithHitbox extends NumericalEntity {hitBox: NumericalEntity} +export namespace deadInTracks { + /** + * This functions checks whether ent walks against a non-walkable object and whether it should move in the x and y position and how much. + * The difference with wallslide is that deadInTracks stops the entity entirely when it touches a non-walkable surface. + * wallslide will move the entity in x or y if possible. + * @param ent The entity that is moving. + * @param map The TileMap the entity moves on. + * @param x The maximal movement on the x. default is 0 + * @param y The maximal movement on the y. default is 0 + * @returns Coordinates of how much the entity walks in x and y. + */ + export function deadInTracks(ent: NumericalEntity | NumericalEntityWithHitbox, map: TileMap, x?: number, y?: number): Coordinates; +} + export namespace wallslide { /** * This functions checks whether ent walks against a non-walkable object and whether it should move in the x and y position and how much.