Author Topic: How to know the dragon move direction about scroll view?  (Read 1820 times)

xiaoniaojjj

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 140
    • View Profile
How to know the dragon move direction about scroll view?
« on: February 10, 2014, 01:25:31 AM »
how to easy  know from left to right or opposite?? or from top to bottom?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: How to know the dragon move direction about scroll view?
« Reply #1 on: February 10, 2014, 05:14:47 AM »
Dragons generally move forward, so look at the direction the dragon's head is pointing. If it faces left, it's almost certainly moving left, and vice versa.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: How to know the dragon move direction about scroll view?
« Reply #2 on: February 10, 2014, 05:19:32 AM »
Seriously though, if I interpret your question to be "How do I know the direction of a drag on a scrollview" then it's actually a bit tricky, since there's no exposed values to easily show you that.

You can look at UICamera.currentTouch.totalDelta but you have to have some assumptions that the scrollview is being interacted with. Look inside UIScrollView.Drag() for the details on how it actually does it.