@@ -169,7 +169,7 @@
169169 direction: 1,
170170
171171 init: function (size, ctx, type) {
172- this._super(size, size, ctx, get(type));
172+ this._super(size, size, ctx, get(type+this.face));
173173 this.direction = -1;
174174 },
175175
@@ -182,6 +182,7 @@
182182 },
183183
184184 // give some dancing abilities to the invaders
185+/*
185186 live: function (x, y) {
186187 this.x = x;
187188 this.y = y;
@@ -201,8 +202,11 @@
201202 }) ();
202203
203204 },
205+*/
204206
205207 move: function (direction) {
208+ this.fill = get('skully'+ this.face);
209+ this.face = (this.face === '1')? '2': '1';
206210 this.moving = true;
207211 this.clear();
208212 this.x += IMGSIZE * direction;
@@ -248,7 +252,7 @@
248252 while (cols--) {
249253 index = this.invaders.push(new Invader(IMGSIZE, this.ctx, 'skully')) -1;
250254 var invader = this.invaders[index];
251- invader.live(x, y);
255+ invader.draw(x, y);
252256 x += IMGSIZE + PADSIZE;
253257 }
254258 y += IMGSIZE + PADSIZE;
@@ -332,8 +336,6 @@
332336 $('body').append(canvas);
333337 var game = new SpaceInvaders(canvas);
334338
335- // this works, but I don't fully understand
336- // why I had to call it like that...
337339 document.onkeydown = function (ev) {
338340 game.keydown.call(game, ev);
339341 }