scutajar Posted November 4, 2013 Share Posted November 4, 2013 Right, so I've been trying to get this gesture recognition script to work with Phaser 1.1.2. My current set up is as follows:I'm using Rich's basic template, and once the Game state is entered, a gestures object is loaded. I've modified the code slightly to be able to pass the Phaser game object in; this allows me to detect the canvas object that Phaser creates.My problem is here, however. If the gestures script uses Phaser's canvas, I don't see anything drawn. If I let the script generate its own canvas on top of the Phaser canvas, I see everything normally.I'm not exactly sure how I'm meant to solve this, or if I can just leave the page with 2 canvases and work from there. Link to comment Share on other sites More sharing options...
onedayitwillmake Posted November 4, 2013 Share Posted November 4, 2013 Are gesture events fired by the class? A simple way to do it, is to go into the instance on mouseUp, and then retrieve the array of points and use those to create a phaser graphics object. Link to comment Share on other sites More sharing options...
scutajar Posted November 6, 2013 Author Share Posted November 6, 2013 Fixed! What I did was set the graphics line style and the moveTo method on this.Down, and then call graphics.lineTo on this.Move. Link to comment Share on other sites More sharing options...
Recommended Posts