[game] Starting to work on IntGrid and other layers
This commit is contained in:
parent
020bb8f124
commit
db0f22b1db
2 changed files with 747 additions and 22 deletions
|
|
@ -266,7 +266,7 @@ 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;
|
||||
return level.values[cy * level.cw + cx] == 1; // TODO: MAGIC NUMBER?
|
||||
return level.values[cy * level.cw + cx] != 0; // TODO: MAGIC NUMBER?
|
||||
}
|
||||
|
||||
export function draw_level(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue