Gesture recognition(c# if possible)

I’m aware that there are assets that have recognition scripts ect. ect.
I want to make a game in what you draw gestures to defeat enemies.

How do I make a script that recognize a gesture(for example a X) and executes/damages a specific enemi.
What would it take?

A game like this Imgur: The magic of the Internet

So based on the image you provided all of their shapes can be done without taking your finger off of the screen.

They probably have a gesture library that holds the shapes in the form of nodes & from the moment you touch the screen to the moment you take your figure off the current gesture is recorded.

Then compare the recorded to the best fit in the library (if there is one) then do wants needed for that gesture.

More complex shapes like an X are trickier as you would want to remove your finger to draw it. You may want to have a gesture input mode where the user can draw the spell then when they are happy with it they can trigger the effect manually (Comparing it to a gesture library to work out what they drew).