syntaxidermy Posted May 31, 2018 Share Posted May 31, 2018 Hi, I'm working on creating interactive buttons which, when clicked, will set the colour of the player. I've managed to do this successfully, in Phaser 3, but the code is quite bulky and ugly looking. I've just been gathering what examples I can through the website, but I'm certain there must be a better way to do this. Here's what I've got: I think what I want to do is create a class for "smalltiles", but I'm not sure how the inheritance should work for using alongside Phaser 3. I've tried writing something like in several different ways, without success: Does anybody have any insight as to how I might be able to do this better? Thanks for the input in advance. Link to comment Share on other sites More sharing options...
samme Posted June 5, 2018 Share Posted June 5, 2018 I think you should be able to use just one 'pointerdown' handler and read the tint of the button there. Link to comment Share on other sites More sharing options...
syntaxidermy Posted June 13, 2018 Author Share Posted June 13, 2018 How would you read the tint of the button in Phaser? I think there's a way to do it in Phaser 2/HTML5, but not sure Phaser 3 supports this yet. Link to comment Share on other sites More sharing options...
Recommended Posts