for (var i = 0; i < 8; i++)
{
babyTail[i] = new Image();
babyTail[i].src = "./src/babyTail" + i +".png";
}
for (var i = 0; i < 2; i++)
{
babyEye[i] = new Image();
babyEye[i].src = "./src/babyEye" + i +".png";
}
我定义了var babyTail = [] 但是尾巴还是没有摇摆
定义 babyTail 的时候是数组 var babyTail = [];