已采納回答 / fishmice
data.double = 2; 必須限定在? if(fruit.fruitType[i] == "blue") 的大括號(hào){}里,如果不小心寫到外面了,可能就會(huì)導(dǎo)致大魚碰到黃色果實(shí),double也變?yōu)?
2016-03-20
已采納回答 / 文詣
draw方法是在born方法之后才執(zhí)行的啊,所以alive已經(jīng)變?yōu)閠rue了,只有經(jīng)過born的才會(huì)開始繪制嘛
2016-03-19
跟下來了
Demo: https://huanyouchen.github.io/demo/imooc/tinyHeart/tinyHeart.html
代碼: https://github.com/guihailiuli/imooc-practice/tree/master/tinyHeart
Demo: https://huanyouchen.github.io/demo/imooc/tinyHeart/tinyHeart.html
代碼: https://github.com/guihailiuli/imooc-practice/tree/master/tinyHeart
2016-03-10