Jump to content

Appgyver Steroids - world bounds


Jirka1111
 Share

Recommended Posts

This is my last problem with game (Don't touch the spikes copy). Everything is fine in Chrome, but sometimes my bird touch world bounds on the right side twice. I check touching with GAME_WIDTH - 40 which is width of the bird. If he touch the right side, he just bounce and score is +1 (but if error shows up, then score is +2).

 

In update:

 

if(this.bird.body.x >= Bird.GAME_WIDTH - 40){
            Bird.score += 1;
            this.addLeftSpikes();
            this.rightSideSpikes.removeAll();
            Bird.scoreText.setText("score: " + Bird.score);
            this.coin.play();
            this.bird.scale.x = -1;
        }
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...