I am trying to handle the events in my function. So it does something in my gameLogic function for each type of event.
Although, the TAP doesn't get recognized ...
What should I do ? Should i separate each event ?
$(function() {
$(".main-wrapper-inner").swipe( {
//Generic swipe handler for all directions
tap:function(event, target) {
gameLogic("tap");
},
swipeLeft:function(event, distance, duration, fingerCount, fingerData) {
gameLogic("swipeLeft");
},
swipeRight:function(event, distance, duration, fingerCount, fingerData) {
gameLogic("swipeRight");
},
swipeUp:function(event, distance, duration, fingerCount, fingerData) {
gameLogic("swipeUp");
},
swipeDown:function(event, distance, duration, fingerCount, fingerData) {
gameLogic("swipeDown");
},
pinchIn:function(event, direction, distance, duration, fingerCount, pinchZoom, fingerData) {
gameLogic("pinchIn");
},
pinchOut:function(event, direction, distance, duration, fingerCount, pinchZoom, fingerData) {
gameLogic("pinchOut");
},
threshold:0,
fingers: 'all'
});
});