本文整理汇总了C#中Point2.ToVector2方法的典型用法代码示例。如果您正苦于以下问题:C# Point2.ToVector2方法的具体用法?C# Point2.ToVector2怎么用?C# Point2.ToVector2使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Point2
的用法示例。
在下文中一共展示了Point2.ToVector2方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
public void Update()
{
if (scollWheelChanged)
{
ScrollWheelVelocity = scrollWheelVelocity / 120f;
scollWheelChanged = false;
}
else
{
ScrollWheelVelocity = 0;
}
lastLocation = Position;
Position = new Point2(currentPosition.X, input.application.FrameSize.Height - currentPosition.Y);
Positionf = Position.ToVector2();
Velocity = Position - lastLocation;
Velocityf = Velocity.ToVector2();
Left.Update(leftOn, Position, Positionf);
Middle.Update(middleOn, Position, Positionf);
Right.Update(rightOn, Position, Positionf);
}
示例2: Update
public void Update()
{
if (scollWheelChanged)
{
ScrollWheelVelocity = scrollWheelVelocity;
scollWheelChanged = false;
}
else
{
ScrollWheelVelocity = 0;
}
Left.Update(leftOn);
Middle.Update(middleOn);
Right.Update(rightOn);
IntPtr w2, w3;
int x, y, x2, y2;
uint mask;
Reign.Core.X11.XQueryPointer(input.application.DC, input.application.Handle, out w2, out w3, out x, out y, out x2, out y2, out mask);
lastPosition = Position;
Position = new Point2(x2, input.application.FrameSize.Height - y2);
PositionVector = Position.ToVector2();
Velocity = Position - lastPosition;
VelocityVector = Velocity.ToVector2();
}