blob: f5c713ddf3055703161e29ccc67afc928b94b9b6 (
plain) (
tree)
|
|
const GameState = {
canvas: null,
ctx: null,
lastFrameTime: 0,
init() {
this.canvas = document.getElementById('gameCanvas');
this.ctx = this.canvas.getContext('2d');
this.lastFrameTime = 0;
},
resize() {
this.canvas.width = window.innerWidth;
this.canvas.height = window.innerHeight;
Camera.centerOn(player.position);
}
};
|