[typings]: Restored deadInTracks
This commit is contained in:
parent
27a30fd0ba
commit
b049787caa
14
lib/index.d.ts
vendored
14
lib/index.d.ts
vendored
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user