Jump to content

coconjs button freeze


skywalker
 Share

Recommended Posts

i made a simple on game controller for a game when test it with coconjs it sometimes freezes and not responding to touch specially on slow devices
then it works and so on 

 

            this.sprite.events.onInputDown.add(function(){
 
                console.log("down")
                if (GAME.paused == false) {
                    this.sprite.alpha = 1;
                    this.pressed = true;
                };
                
            }, this);
 
            this.sprite.events.onInputUp.add(function(){
 
                if (GAME.paused == false) {
                    this.sprite.alpha = 0.35;
                    this.pressed = false;
                };
                

            }, this);

 

and they are fixed to camera  

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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