Direction constants

I want to implement something which should take direction as argument and wonder, is there any existing constants in cocos2d-x?
Thanks for any help!

Sorry, I don’t follow, explain more. I think you can use Actions and Sequences.

You didn’t understood me. I want to create (extended, of cource :grin:) clone of 2048 and have to pass direction as argument. So is there any enumerations/etc. which provide 2d directions (UP/DOWN/LEFT/RIGHT).
Thanks!

Oh, no. There are not. But this is easy to figure out by testing the delta of the start touch position and then touched moved locations.

Thank you for your help, I didn’t talked about detecting swipes, only about enum to use as argument, like implemented by mysel:

enum class Direction {
	UP,
	DOWN,
	LEFT,
	RIGHT
};

Something like cocos2d::DIRECTION.

You can use deltas from Actions too or after using multiple setPositions() commands.