最新回答 / 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