@rpgjs/physic
Version:
A deterministic 2D top-down physics library for RPG, sandbox and MMO games
32 lines • 784 B
TypeScript
import { Entity } from '../../physics/Entity';
import { MovementBody } from '../MovementStrategy';
/**
* Wraps a physics entity to expose the generic `MovementBody` interface.
*/
export declare class EntityMovementBody implements MovementBody {
private readonly entity;
constructor(entity: Entity);
get id(): string;
get position(): {
x: number;
y: number;
};
get velocity(): {
x: number;
y: number;
};
setVelocity(velocity: {
x: number;
y: number;
}): void;
translate(delta: {
x: number;
y: number;
}): void;
isStatic(): boolean;
/**
* Returns the underlying entity reference.
*/
getEntity(): Entity;
}
//# sourceMappingURL=EntityMovementBody.d.ts.map