查看: 745|回复: 0
打印 上一主题 下一主题

关于多触点过界的问题

[复制链接]

2508

主题

2

听众

3万

积分

资深设计师

Rank: 7Rank: 7Rank: 7

纳金币
32806
精华
12

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

跳转到指定楼层
楼主
发表于 2013-1-30 09:04:07 |只看该作者 |倒序浏览
帮看看下面的程序:多触点问题。
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事件,求高手指点下  
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

手机版|纳金网 ( 闽ICP备2021016425号-2/3

GMT+8, 2025-7-29 12:55 , Processed in 0.057642 second(s), 31 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部