【发布时间】:2017-02-04 14:23:34
【问题描述】:
我遇到了触摸卡住并且永远不会消失的问题。
我做了一个测试程序,它发生在触摸(在本例中是使用 TouchPanel.EnableMouseTouchPoint = true 的鼠标按钮)被按住然后当光标离开窗口时释放。接触点会卡住并继续存在。这样做你可以建立一大堆不存在的旧接触。
相关代码:
TouchCollection touches;
然后在初始化:
TouchPanel.EnableMouseTouchPoint = true;
更新:
touches = TouchPanel.GetState();
然后在抽奖:
spriteBatch.Begin();
for (int i = 0; i < touches.Count; i++)
{
spriteBatch.Draw(debugPoint, touches[i].Position);
}
spriteBatch.End();
我已经在 VisualStudio 2015、monogame 3.5 和 3.6 上尝试过。
【问题讨论】: