0

任何事件或如何将点击(向下触摸)和点击(向上触摸)识别为 XNA + windows phone 7 中的两种不同手势?

4

1 回答 1

1

就这样:

TouchCollection touchCollection = TouchPanel.GetState();
        foreach (TouchLocation tl in touchCollection)
        {
            if (tl.State == TouchLocationState.Pressed)
            {
                  ...on touch down code
            }

            if (tl.State == TouchLocationState.Released)
            {
                  ...on touch up code
            }

        }
于 2012-10-13T05:53:31.480 回答