第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

fruit出不來(lái)啊,

Uncaught SyntaxError: Unexpected token ILLEGAL

?這個(gè)說(shuō)是for(var i=0;i<this.num;i++)錯(cuò)了

代碼

var?fruitObject=function(){
this.alive=[];//boolean
this.orange=new?Image();
this.bliue=new?Image();
this.x=[];
this.y=[];

}
fruitObject.prototype.num=30;
fruitObject.prototype.init=function()?{
	for(var?i=0;i<this.num;i++){
		this.alive[i]=true;
		this.x[i]=0;
		this.y[i]=0;
		this.born(i);
	}
	this.orange.src="./src/fruit.png";
	this.blue.src="./src/blue.png";
}
fruitObject.prototype.draw=function(){
	for(var?i=0;i<this.name;i++){
		ctx2.drawImage(this.orange,this.x[i],this.y[i]);

	}

}

fruitObject.prototype.born=function(i){
	var?aneid=Math.floor(Math.random()*ane.num);
	this.x[i]=ane.x[aneid];
	this.y[i]=canHeight-ane.length[aneid];
?

}


正在回答

1 回答

第四行blue寫成了bliue,draw后面for中的i<this.num 寫錯(cuò)了,寫成 name了

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

fruit出不來(lái)啊,

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)