本文整理汇总了C#中MouseEventArgs.GetMovementY方法的典型用法代码示例。如果您正苦于以下问题:C# MouseEventArgs.GetMovementY方法的具体用法?C# MouseEventArgs.GetMovementY怎么用?C# MouseEventArgs.GetMovementY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MouseEventArgs
的用法示例。
在下文中一共展示了MouseEventArgs.GetMovementY方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MouseMove
public void MouseMove(MouseEventArgs e)
{
mouseCurrentX = e.GetX();
mouseCurrentY = e.GetY();
mouseDeltaX += e.GetMovementX();
mouseDeltaY += e.GetMovementY();
for (int i = 0; i < clientmodsCount; i++)
{
if (clientmods[i] == null) { continue; }
clientmods[i].OnMouseMove(this, e);
}
}
示例2: HandleMouseMove
public void HandleMouseMove(MouseEventArgs e)
{
float dx = e.GetMovementX();
float dy = e.GetMovementY();
previousMouseX = e.GetX();
previousMouseY = e.GetY();
if (mousePressed)
{
// ySpeed += dx / 10;
// xSpeed += dy / 10;
}
screen.OnMouseMove(e);
}
示例3: MouseMove
public void MouseMove(MouseEventArgs e)
{
if (!e.GetEmulated())
{
// Set x and y only for real MouseMove events
mouseCurrentX = e.GetX();
mouseCurrentY = e.GetY();
}
else
{
// Get delta only from emulated events (actual events negate previous ones)
mouseDeltaX += e.GetMovementX();
mouseDeltaY += e.GetMovementY();
}
for (int i = 0; i < clientmodsCount; i++)
{
if (clientmods[i] == null) { continue; }
clientmods[i].OnMouseMove(this, e);
}
}