Jump to content

new to phaser would like some help


Recommended Posts

Hello im new to phaser and programming in general. I never really understood programming until I started with phaser. I'm enjoying it so far. I wanted to ask if anyone can help me with my code. I am practicing by making a project similar to the monster wants candy tutorial. I having trouble with the scoring of my game. Here is the section of the code that i have put in the update loop.

            if(element.y>this.game.world.height-130 && element.frame!=6){
                this.decreaseScore();//starting score is 5 and this function decreases by 1
            }else if(element.frame==6 && element.y>this.game.world.height-120){




When i console.log() the score when 1 item reaches the bottom it decreases almost up to -60.

Hope this screen shot will help. Thank you guys in advance.

Screenshot (39).png

Link to comment
Share on other sites


  • Recently Browsing   0 members

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