feat(#8): improve debug
This commit is contained in:
parent
4e2905cf96
commit
731a32303a
8 changed files with 84 additions and 88 deletions
8
index.js
8
index.js
|
@ -2,7 +2,7 @@ import { GAME_HEIGHT, GAME_WIDTH } from "./modules/constants.js";
|
|||
import {
|
||||
Camera,
|
||||
CanvasResizer,
|
||||
Debug,
|
||||
FpsCounter,
|
||||
GameObject,
|
||||
MapManagement,
|
||||
} from "./modules/game-objects/index.js";
|
||||
|
@ -30,10 +30,10 @@ class Game extends GameObject {
|
|||
percentage: 0.9,
|
||||
});
|
||||
const camera = new Camera({
|
||||
mapManagement: new MapManagement({ maps: maps }),
|
||||
gameObjects: [new MapManagement({ maps: maps })],
|
||||
});
|
||||
const debug = new Debug({ debug: false });
|
||||
this.gameObjects = [canvasResizer, camera, debug];
|
||||
const fpsCounter = new FpsCounter({ debug: false });
|
||||
this.gameObjects = [canvasResizer, camera, fpsCounter];
|
||||
|
||||
this.canvas = canvas;
|
||||
this.ctx = this.canvas.getContext("2d");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue