nicksoph Posted November 6, 2016 Share Posted November 6, 2016 Hi, Im looking for some general advice about how to do something in phaser. I have been learning javascript but only have a basic grasp of its use and have been advised that using phaser would be a good way forward to make a particular game I have in mind. What I want to do is to create a game based upon just 6 coloured areas, the game requires a user to select two of the boxes which, after chosing the second box, will then change colour: This selection of the two boxes can either be two separate taps (one on each box) or touching one of the boxes and then sliding to the other when the finger is removed and the action taken, in this 2nd method of choosing (the sliding process) it is significant that if a 3rd box is passed through on the way between the first and second choice no action is taken. At the moment I have the basic phaser structure in place and have created the boxes and have the logic of the colour changes worked out but am struggling with how best to set up touch logic and would like a general description of how to best set up the touch process eg. setup up a touch event on all six boxes to deal with a tap and then setup a swipe event on the canvas that only works on swipes. EDIT: Just to add: I have been trying this morning to do just the swipe bit and can now see that the up and down events are always bound to the object where the down event took place. How do you discover what sprite is beneath the pointer on input up? Any advice appreciated. Link to comment Share on other sites More sharing options...
Recommended Posts