nduhu Posted June 4, 2014 Share Posted June 4, 2014 i want to disable button after clicking to prevent double-click and enabled again after specific time ? how i can do it ? Link to comment Share on other sites More sharing options...
j0hnskot Posted June 4, 2014 Share Posted June 4, 2014 You could add a custom property to the button. Do something like this: button = game.add.button(0,0, 'button', buttonPressed,this);button.clicked=false;function buttonPressed(){ if(!button.clicked}{ //do something button.clicked=true; game.time.events.add(1000,function(){ button.clicked=false},this); } } Link to comment Share on other sites More sharing options...
Recommended Posts