Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stetso/GidSwipe
Simple tap and swipe detection library for the Gideros Game Engine (supports 4 and 8 directions)
https://github.com/stetso/GidSwipe
gamedev gideros mobile swipe-gestures
Last synced: 2 months ago
JSON representation
Simple tap and swipe detection library for the Gideros Game Engine (supports 4 and 8 directions)
- Host: GitHub
- URL: https://github.com/stetso/GidSwipe
- Owner: stetso
- License: mit
- Created: 2017-04-27T14:29:43.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-04-27T17:20:13.000Z (over 7 years ago)
- Last Synced: 2024-08-02T19:37:01.749Z (6 months ago)
- Topics: gamedev, gideros, mobile, swipe-gestures
- Language: Lua
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-gideros - GidSwipe - Easy to use tap and swipe manager for mobile. (Resources / Input)
README
# 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.
```lua
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.