public SonicEngine()
{
Instance = this;
/*var pl = @"";
Window.Instance.Me().Global.Console.Log(new Compressor().CompressText(pl));*/
gameCanvas = CanvasInformation.Create((CanvasElement) Document.GetElementById(gameCanvasName), 0, 0,true);
uiCanvas = CanvasInformation.Create((CanvasElement)Document.GetElementById(uiCanvasName), 0, 0, true);
//new SpeedTester(gameCanvas);return;
canvasWidth = 0;
canvasHeight = 0;
bindInput();
fullscreenMode = true;
Window.AddEventListener("resize", e => resizeCanvas(true));
jQuery.Document.Resize(e => resizeCanvas(true));
sonicManager = new SonicManager(this, gameCanvas, () => resizeCanvas(true));
sonicManager.IndexedPalette = 0;
Window.SetInterval(sonicManager.Tick, 1000 / 60);
Window.SetInterval(GameDraw, 1000 / 60);
Window.SetInterval(UIDraw, 1000 / 10);
resizeCanvas(true);
}