MattRix / Futile

A super simple Unity 2D framework
http://struct.ca/futile
830 stars 130 forks source link

Create easy multi-touch system #119

Open MattRix opened 11 years ago

MattRix commented 11 years ago

The current multi-touch system is decent, but there should also be an even simpler API for it, something that can just be accessed on Futile.touchManager, and that works like Unity does.

hyakugei commented 11 years ago

One thing i've run into in my experiments is that i would like to have a delegate able to receive the array of touch events, rather then it only being available to the touch-enabled object itself.

MattRix commented 11 years ago

Well you can make any object (not just FNodes) implement FMultitouchableInterface and FSingleTouchableInterface, if you want, which basically gives you the same thing.

hyakugei commented 11 years ago

ah i didn't realize that i could do that - i thought it had to be a child of a Container or other "on stage" object. You are right, that totally removes the need for the delegate/event style.

Thanks for the pointer!

foobraco commented 11 years ago

FWIW I managed to use Prime31's TouchKit https://github.com/prime31/TouchKit and thanks to Matt's advice I just had to adjust the coordinate system to Futile's and it works perfectly, I'm still getting used to the internals of Futile but maybe there is a way to include TouchKit as an option built-in into Futile as it is with GoKit?

diegodorado commented 10 years ago

@foobraco i've came across touchkit too, and since i saw this comment of yours i'm wondering what did you had to adjust on the coordinates system to TouchKit play nice with Futile ?