快捷导航

h5爱心鱼 第一阶段 果实为什么没有出现呢? 求大神帮忙看看

//index.htmlGAME

//action.jsvar can1,    can2;var ctx1,        ctx2;var lastTime,        deltaTime;var canWidth,        canHeight;var bgPic=new Image();        var ane,        fruit;var mom;var mx,        my;document.body.onload=game;function game(){        init();        lastTime=Date.now();        deltaTime=0;        gameloop();}function init(){        can1=document.getElementById("canvas1");        ctx1=can1.getContext('2d');        can2=document.getElementById("canvas2");        ctx2=can2.getContext('2d');        can1.addEventListener('mousemove',onMouseMove,false);        bgPic.src="./img/background.jpg";        canWidth=can1.width;        canHeight=can1.height;        ane=new aneObj();        ane.init();        fruit=new fruitObj();        fruit.init();        mom=new momObj();        mom.init();        mx=canWidth*0.5;        my=canHeight*0.5;}function gameloop(){        window.requestAnimFrame(gameloop);        var now=Date.now();        deltaTime=deltaTime

免责声明:本内容仅代表回答者见解不代表本站观点,请谨慎对待。

版权声明:作者保留权利,不代表本站立场。

回复

使用道具 举报

参与会员1

应该还是我懒的问题,你要是把HTML也放进来我直接复制过来运行就可以看错误了,这样直接看代码,不是很喜欢
回复

使用道具 举报

可能感兴趣的问答

发新帖
  • 微信访问
  • 手机APP