[game] Tweaks

This commit is contained in:
John Doty 2023-08-23 20:10:22 -07:00
parent 38f5f95827
commit 756a3634c0
3 changed files with 16 additions and 16 deletions

View file

@ -262,11 +262,7 @@ export async function load_world(path: string): Promise<World> {
return { levels, tilesets };
}
export function has_collision(
level: Level | undefined,
cx: number,
cy: number
): boolean {
export function has_collision(level: Level, cx: number, cy: number): boolean {
if (!level) return true;
if (cx < 0 || cx >= level.cw) return false;
if (cy < 0 || cy >= level.ch) return false;