Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void MoveTile()
- {
- if (swipeAngle > -45 && swipeAngle <= 45 && column < grid.gridSizeX)
- {
- //Right swipe
- SwipeRightMove();
- Debug.Log("Right swipe");
- }
- else if (swipeAngle > 45 && swipeAngle <= 135 && row < grid.gridSizeY)
- {
- //Up swipe
- SwipeUpMove();
- Debug.Log("Up swipe");
- }
- else if (swipeAngle > 135 || swipeAngle <= -135 && column > 0)
- {
- //Left swipe
- SwipeLeftMove();
- Debug.Log("Left swipe");
- }
- else if (swipeAngle < -45 && swipeAngle >= -135 && row > 0)
- {
- //Down swipe
- SwipeDownMove();
- Debug.Log("Down swipe");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement