把課程的項目代碼整理到github上了,網(wǎng)址:https://github.com/yangfeng1003/tinyHeart
大家可以一起交流哦~
大家可以一起交流哦~
2019-06-01
魚角度旋轉(zhuǎn)好像 用
ctx1.rotate(Math.atan2(this.y - mousey, this.x - mousex));
也行
ctx1.rotate(Math.atan2(this.y - mousey, this.x - mousex));
也行
2019-05-20
我覺得沒法調(diào)用的另一個原因是因為canHeight被放在gameloop當(dāng)中每幀調(diào)用,如果將canHeight改為can1.height一樣可以解決果實出不來的問題,之后如果有顯示適配也比較容易調(diào)整。
2019-02-14