import {Manager} from "./manager.js"

window.onbeforeunload = function(evt) {
	this.manager.onClose()
   return true;
}

window.setup = () => {

	this.height = 600;
	this.width = 800;
	this.manager = new Manager();

	angleMode(DEGREES);
	createCanvas(windowWidth, windowHeight);
	frameRate(120);
}

window.draw = () => {

  clear();
  background(51);
  this.manager.draw();
}

window.mouseClicked = () => {

	this.manager.onClick();
}


window.windowResized = () => {
  resizeCanvas(windowWidth, windowHeight);
	this.manager.onRisize()
}
