- 最后登录
- 2017-5-15
- 注册时间
- 2012-3-1
- 阅读权限
- 90
- 积分
- 32973
  
- 纳金币
- 32806
- 精华
- 12
|
帮看看下面的程序:多触点问题。
function Touchs()
{
for(var touch : Touch in Input.touches)
{
for(var i = 0;i < Input.touchCount; ++i)
{
if(touch.position.x >380 && touch.position.x <480 && touch.position.y > 0 && touch.position.y < 70)
{
if(Input.touchCount > 0 && touch.phase == TouchPhase.Moved)
{....}
else if(touch.phase != TouchPhase.Moved)
{....}
}
if(touch.position.x >0 && touch.position.x <43 && touch.position.y > 0 && touch.position.y < 80)
{
if(touch.phase == TouchPhase.Began)
{....}
if(touch.phase == TouchPhase.Ended)
{...}
}
}
}
}
结果在Began的时候,如果我按着移到边界以外再松手的时候会卡在Began上,检测不到Ended事件,求高手指点下 |
|