From 5f6c155b3abb957f9eaaaa593cb2fe2811c623a5 Mon Sep 17 00:00:00 2001 From: mumuy Date: Thu, 21 Apr 2016 20:52:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E5=91=BD=E8=AE=A1=E6=95=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 6463ca0..cb9a13c 100644 --- a/index.js +++ b/index.js @@ -287,7 +287,7 @@ width:30, height:30, draw:function(context){ - for(var i=0;i<_LIFE;i++){ + for(var i=0;i<_LIFE-1;i++){ var x=this.x+36*i,y=this.y; context.fillStyle = '#FFE600'; context.beginPath(); @@ -314,7 +314,7 @@ if(typeof this.control.orientation!='undefined'){ if(!map.get(coord.x+_COS[this.control.orientation],coord.y+_SIN[this.control.orientation])){ this.orientation = this.control.orientation; - } + } } this.control = {}; var value = map.get(coord.x+_COS[this.orientation],coord.y+_SIN[this.orientation]); @@ -409,7 +409,7 @@ }, draw:function(context){ context.fillStyle = this.color; - context.beginPath(); + context.beginPath(); context.arc(this.x,this.y,this.width*.5,0,Math.PI,true); switch(this.times%2){ case 0: @@ -504,4 +504,4 @@ }); })(); game.init(); -})(); \ No newline at end of file +})();