PizzaPie773 Posted November 30, 2016 Share Posted November 30, 2016 Hello, my class and I have recently started phaser, we are using the farm animal game from zenva to make a new game with the same mechanics. The game me and my partner are making is a guessing game, but I am having some trouble figuring out how to make our buttons work. What I had planned to have is where a player could pick a button and it would replace text with a message saying if they are right or wrong. I am not sure where to start, please help thank you. Link to comment Share on other sites More sharing options...
XekeDeath Posted December 1, 2016 Share Posted December 1, 2016 You'll want these things: Image/Sprite for the buttons... Image/Sprite input enabled to make the button clickable... Image/Sprite.events to find the interaction you want, and what the callback will receive... Phaser.Text for the text to tell them if they are right or wrong. For the answers part, you will need something to track your questions and assign an answer to each button... When the button is pressed, check the answer that you assigned it in the callback to see if they are correct, and adjust the text accordingly... Without writing it for you, that should be enough to get you going... The docs are very helpful... Link to comment Share on other sites More sharing options...
Recommended Posts