export function collide2d(dynamic: boolean, layers: Layer, mask: Layer, size: Vec2 = [1, 1]) {
return (game: Game, EntityId: Entity) => {
game.World.Signature[EntityId] |= Has.Collide2D;
game.World.Collide2D[EntityId] = {
EntityId,
New: true,
Dynamic: dynamic,
Layers: layers,
Mask: mask,
Size: size,
Min: [0, 0],
Max: [0, 0],
Center: [0, 0],
Collisions: [],
};
};
}