From 5de8bd975107357db11619943377877844a43385 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 18 Mar 2019 17:05:51 -0400 Subject: [PATCH] Added a last missing quadrant row (#813) There weren't enough quadrant rows to cover the bottom bit of the screen, so collision detection wasn't happening there. Fixes #624. --- src/creators/createQuadsKeeper.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/creators/createQuadsKeeper.ts b/src/creators/createQuadsKeeper.ts index 024f45f2..4fd8c828 100644 --- a/src/creators/createQuadsKeeper.ts +++ b/src/creators/createQuadsKeeper.ts @@ -4,15 +4,18 @@ import { IThing } from "../components/Things"; import { FullScreenPokemon } from "../FullScreenPokemon"; export const createQuadsKeeper = (fsp: FullScreenPokemon) => { - const quadrantWidth: number = fsp.settings.width / 6; - const quadrantHeight: number = fsp.settings.height / 6; + const numRows = 5; + const numCols = 6; + + const quadrantWidth: number = fsp.settings.width / numCols; + const quadrantHeight: number = fsp.settings.height / numRows; return new QuadsKeepr({ quadrantFactory: (): IQuadrant => fsp.objectMaker.make>("Quadrant"), quadrantWidth, quadrantHeight, - numRows: 5, - numCols: 6, + numRows, + numCols, groupNames: ["Solid", "Character", "Scenery", "Terrain", "Text"], startLeft: -quadrantWidth, startTop: -quadrantHeight,