最新回答 / morninggair
//繪制果實var fruitObj = function(){ this.alive = [];//bool this.x = []; this.y = []; this.l = []; this.spd = []; this.fruitType = []; this.orange = new Image(); this.blue = new Image();}fruitObj.prototype.num = 30;fruitObj.prototype.init = function(){ for(va...
2018-03-07
已采納回答 / 文文和仙仙的故事3247425
fruitObj.prototype.born = function(){var aneID = Math.floor(Math.random() * ane.num);this.x = ane.x[aneID];this.y = canHeight - ane.len[aneID];}代碼寫錯了,應該是this.x[i] = ane.x[aneID];this. y[i]?= canHeight - ane.len[aneID];
2018-02-25