Skip to content

Simple tap and swipe detection library for the Gideros Game Engine (supports 4 and 8 directions)

License

Notifications You must be signed in to change notification settings

stetso/GidSwipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GidSwipe

Simple tap and swipe detection library (supports 4 and 8 directions)

Simply create an instance of GidSwipe in your project and make the stage listen to the Event.TAP and/or Event.SWIPE events.

local swiper = GidSwipe.new()
-- listen to taps
stage:addEventListener(Event.TAP, function(ev) 
  print("tapped the screen at "..ev.x,ev.y)
end)
-- listen to swipes
stage:addEventListener(Event.SWIPE, function(ev)
  print("swiped "..ev.direction.." from "..ev.startX,ev.startY)
end

Thats it! There are currently 3 options to be set with GidSwipe.setOption() - check out the description in the GidSwipe.lua file.

About

Simple tap and swipe detection library for the Gideros Game Engine (supports 4 and 8 directions)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages