如何把尾巴摇摆放入baby.js里
var smallfish=function () {
this.x;
this.y;
this.angle;
this.eye=new Image();
this.fade=new Image();
this.tail=new Image();
this.smallfishtail;
for (var i=0;i<8;i++)
{
this.smallfishtail[i]=new Image();
this.smallfishtail[i].src="./src/babyTail"+i+".png";
}
这样的话在 this.smallfishtail[i]=new Image();会报错Cannot set property '0' of undefined。怎么定义啊