swipe detector
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..64d2cb0 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# godot swipe detector + +[](https://godotengine.org "Made with godot") +[](https://www.npmjs.com/package/@bendn/swipe-detector) +<a href='https://ko-fi.com/bendn' title='Buy me a coffee' target='_blank'><img height='28' src='https://storage.ko-fi.com/cdn/brandasset/kofi_button_red.png' alt='Buy me a coffee'> </a> + +A script to detect directional swipes on the screen. + +## Usage example + +```gdscript +func _ready(): + add_child(SwipeDetector.new()) + +func _input(event): + if event is InputEventSwipe: + print(event.direction) +``` |