同跪在這里,怒復(fù)制以警示。
老師的重點(diǎn)&&邏輯真是一點(diǎn)也不清楚。。。不管怎樣,老師您辛苦了
搞了半天,解決漂浮直線和??煌该?,在gameloop里面用cxt2畫背景圖片才能蓋住上一幀:
function gameloop(){
cxt2.drawImage(bg,0,0);
ane.draw();
fruit.draw();
}
老師的重點(diǎn)&&邏輯真是一點(diǎn)也不清楚。。。不管怎樣,老師您辛苦了
搞了半天,解決漂浮直線和??煌该?,在gameloop里面用cxt2畫背景圖片才能蓋住上一幀:
function gameloop(){
cxt2.drawImage(bg,0,0);
ane.draw();
fruit.draw();
}
2016-10-21
果實(shí)沒出來的同學(xué)改一下born函數(shù)里面的this.y[i]的值,將this.y[i]改大一點(diǎn)就能看見果實(shí)了;fruitObj.prototype.born = function(i){
var aneID = Math.floor(Math.random()*ane.num);
this.x[i] = ane.rootx[aneID];
this.y[i] = ane.heady[aneID];
console.log(ane.heady[aneID]);
}
var aneID = Math.floor(Math.random()*ane.num);
this.x[i] = ane.rootx[aneID];
this.y[i] = ane.heady[aneID];
console.log(ane.heady[aneID]);
}
2016-10-19
搞了半天,解決漂浮直線和??煌该?,在gameloop里面用cxt2畫背景圖片才能蓋住上一幀:
function gameloop(){
cxt2.drawImage(bg,0,0);
ane.draw();
fruit.draw();
}
function gameloop(){
cxt2.drawImage(bg,0,0);
ane.draw();
fruit.draw();
}
2016-10-14
我敲出來的代碼 一點(diǎn)沒有錯(cuò) 魚媽媽 就是不要跟著鼠標(biāo)動(dòng) 但是可以在原地轉(zhuǎn)圈 查源碼搞了好久 之后不明覺厲的可以跟著鼠標(biāo)動(dòng)了 過幾分鐘后又不能了 不知道為什么 到最后試著把相應(yīng)代碼刪除再打一邊然后保存運(yùn)行 才可以穩(wěn)定完全運(yùn)行了 希望有和我類似的問題的同學(xué) 能幫到你。。。 熬夜解決這個(gè)搞得熬得好困 。。。不過蠻有意思的啊啊啊啊?。。。。?!誰能懂我。。。。。