Skip to content

Commit

Permalink
adicionado: verificação de toque na tela para salto no jogo. #19
Browse files Browse the repository at this point in the history
  • Loading branch information
Garrocho committed Feb 18, 2014
1 parent f92b119 commit ededb2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jogo/assets/js/Jogo.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ BasicGame.Jogo.prototype = {
this.fundo3.tilePosition.x -= this.velocidade[2];
this.jogador.body.velocity.x = 0;
this.jogador.body.velocity.y = 0;

if (this.AGACHAR) {
if ((this.cursors.down.isDown && !this.pulando) || (this.conexao.movimento === -1 && !this.pulando))
{
Expand All @@ -124,7 +124,7 @@ BasicGame.Jogo.prototype = {
}
}

if ((this.cursors.up.isDown && !this.pulando && !this.agachado) || (this.conexao.movimento === 1 && !this.pulando && !this.agachado))
if ((this.input.activePointer.isDown && !this.pulando) || (this.cursors.up.isDown && !this.pulando && !this.agachado) || (this.conexao.movimento === 1 && !this.pulando && !this.agachado))
{
this.som_pulo.play();
this.contador_pulo+=0.15;
Expand Down

0 comments on commit ededb2c

Please sign in to comment.