Hi All Im trying to implement a touch slide event Ive created a few classes before including a slider a scene slide transition and a scrolling text box but I haven't used slide gestures for a while and now I need to implement some more objects which require a slide action. However its getting to be a bit of a chore creating global variables in the class that uses the slide gesture and retyping the code on a class by class basis, So I want to implement a single event which has the basic information I need, without having to do it over and over again, but I am unsure how best to proceed.
Basically I want a touch event with globalX, tap count, touch phase ect but with the following additional properties
FirstTouchX, FirstTouchY, slideDirection, firstSlideDirection, slideDistance, slideDistanceX, slideDistanceY, slideSpeed, slideSpeedx, slideSpeedY, slideAngle and for a little bit of convenience perhaps localX and localY.
I don't want to modify the sparrow source code if possible, I did think of catching the standard SPTouch event in my main class and then re dispatching my new event but obviously this would be caught by all classes which implemented the listener and not just the specific object which was touched, and it would feel a little hacky, so Im currently left scratching my head as to how to implement it anybody have any ideas
Thanks in advance 🙂