Speed the game up on death, too.
This commit is contained in:
parent
dac415ab16
commit
e2092c9aa7
|
@ -154,12 +154,14 @@ pong.prototype.update= function(t){
|
||||||
this.setup(-1);
|
this.setup(-1);
|
||||||
this.ball.ang=Math.PI-this.ball.ang;
|
this.ball.ang=Math.PI-this.ball.ang;
|
||||||
this.game.run=1;
|
this.game.run=1;
|
||||||
|
this.ball.size.s*=1.05;
|
||||||
};
|
};
|
||||||
|
|
||||||
if(this.ball.x-this.ball.size.w<-field.w){
|
if(this.ball.x-this.ball.size.w<-field.w){
|
||||||
this.score.right.pts++;
|
this.score.right.pts++;
|
||||||
this.setup(1);
|
this.setup(1);
|
||||||
this.game.run=1;
|
this.game.run=1;
|
||||||
|
this.ball.size.s*=1.05;
|
||||||
};
|
};
|
||||||
|
|
||||||
if(this.ball.ang<0)
|
if(this.ball.ang<0)
|
||||||
|
|
Loading…
Reference in New Issue