var can1;var can2;var ctx1;var ctx2;var lastTime;var deltaTime;document.body.onload = game;function game(){ init(); gameloop();}function init(){ can1 = document.getElementById("canvas1"); ctx1 = can1.getContext('2d'); can2 = document.getElementById("canvas2"); ctx2 = can2.getContext();}function gameloop(){ window.requestAnimFrame(gameloop);}
看大家的回答改了代碼,還是相同的報(bào)錯(cuò)。。一臉懵逼
稱霸一世
2016-07-26 08:31:24