Jump to content

Button doesn't work at all


costa
 Share

Recommended Posts

Hello!

 

I have a button:

 

 

module.exports = { //this is browserify and it works - ok
 
    init: function() {
        close = game.add.button(w/1.47, h/1.272, 'close', this.close, this, 2, 1, 0);
        close.fixedToCamera = true;
        close.inputEnabled = true;
   },
 
    close: function() {
        alert('asd')
        close.key = 'img/profile/closePress.png';
    }
};
 
I don't understand why it doesn't work
 
I will really appreciate your answer! Thank you =)
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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