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

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

大魚,大魚,看不出來可以直接復(fù)制

//大魚 API translate();rotate()旋轉(zhuǎn).angle指旋轉(zhuǎn)的角度,順時(shí)針旋轉(zhuǎn);Math.atan2(y,x);

var momObj = function(){

this.x ;//坐標(biāo)

this.y ;

this.bigEye = new Image();//魚的眼睛

this.bigBody = new Image();//魚的身體

this.bigTail = new Image();//魚的尾巴

}

momObj.prototype.init = function(){

this.x = canWidth * 0.5;

this.y = canHeight ?* 0.5;

this.bigEye.src = "./src/bigEye0.png";

this.bigBody.src = "./src/bigSwim0.png";

this.bigTail.src = "./src/bigTail0.png";

}

momObj.prototype.draw = function(){

ctx1.save();

ctx1.translate(this.x,this.y);/*方法轉(zhuǎn)換畫布的用戶坐標(biāo)系統(tǒng)。平移,將畫布的坐標(biāo)原點(diǎn)向左右方向移動(dòng)x,向上下方向移動(dòng)y.canvas的默認(rèn)位置是在(0,0)*/

ctx1.drawImage(this.bigEye,-this.bigEye.width*0.5,-this.bigEye.height*0.5);

ctx1.drawImage(this.bigBody,-this.bigBody.width*0.5,-this.bigBody.height*0.5);

ctx1.drawImage(this.bigTail,-this.bigTail.width*0.5+30,-this.bigTail.height*0.5);

ctx1.restore();

}


正在回答

1 回答

方法要執(zhí)行才可以

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

舉報(bào)

0/150
提交
取消
HTML5小游戲---愛心魚(上)
  • 參與學(xué)習(xí)       92344    人
  • 解答問題       576    個(gè)

學(xué)做HTML5游戲,輕輕松松帶你上手,適合剛?cè)胧钟螒蜷_發(fā)的同學(xué)

進(jìn)入課程

大魚,大魚,看不出來可以直接復(fù)制

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

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

幫助反饋 APP下載

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

公眾號(hào)

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