A level component.
(sym: string, p: Vec2): GameObj | null Spawn a tile from a symbol defined previously.
(obj: CompList<T>, p: Vec2): GameObj<T> | null Spawn a tile from a component list.
returns The spawned game object, or null if the obj hasn't components.
(): number Total width of level in pixels.
(): number Total height of level in pixels.
(tilePos: Vec2): GameObj[] Get all game objects that's currently inside a given tile.
(origin: Vec2, direction: Vec2): RaycastResult Raycast all game objects on the given path.
(tilePos: Vec2): Vec2 Convert tile position to pixel position.
(pos: Vec2): Vec2 Convert pixel position to tile position.
(from: Vec2, to: Vec2, opts?: PathFindOpt): Vec2[] | null Find the path to navigate from one tile to another tile.
returns A list of traverse points in tile positions.
(from: Vec2, to: Vec2, opts?: PathFindOpt): Vec2[] | null Find the path to navigate from one tile to another tile.
returns A list of traverse points in pixel positions.