Jump to content

slow pointerdown, pointerup


marius98
 Share

Recommended Posts

Hi!

I just made an button. I want to change his texture when that button is pressed and change it back when i release the mouse, for that i use pointerup and pointerdown but is slow, i use an old pc, when i try my code in a better pc works great.

My questions are: Why is slow on my slow pc, is this normal?

There is a better way?

var buttonCancel=this.add.sprite(122,1038,'megaset',"Button.png");
        buttonCancel.setTint(0xf858f5);
        buttonCancel.setInteractive();

        buttonCancel.on('pointerdown',function(){
            this.setFrame("ButtonApasat.png");
        });
        buttonCancel.on('pointerup',function(){
            this.setFrame("Button.png");
        });

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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