prime31 / TouchKit

Gestures and input handling made sane for Unity
904 stars 137 forks source link

Update to TKSwipeRecognizer.cs Logic #48

Closed DonLoquacious closed 8 years ago

DonLoquacious commented 8 years ago

Added four new basic swipe directions (diagonals), a simple line "straightness" integrity check to eliminate some false-positives, and the "triggerWhenCriteriaMet" boolean which gives the option to check for completion mid-gesture (in touchesMoved, the default) or only post-gesture (in touchesEnded). Also added summary data to all public members and several new categorical flags to the swipe enumeration list (to easily check if a swipe was in "any cardinal direction", for instance).