当前位置: 首页>>代码示例>>C#>>正文


C# MouseButton.GetMappedState方法代码示例

本文整理汇总了C#中MouseButton.GetMappedState方法的典型用法代码示例。如果您正苦于以下问题:C# MouseButton.GetMappedState方法的具体用法?C# MouseButton.GetMappedState怎么用?C# MouseButton.GetMappedState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MouseButton的用法示例。


在下文中一共展示了MouseButton.GetMappedState方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IsButtonReleased

 /// <summary>
 /// Gets if the mouse button was released in this frame.
 /// </summary>
 /// <param name="b">The MouseButton to check.</param>
 /// <returns>`true` if the mouse button was released, `false` otherwise.</returns>
 public bool IsButtonReleased(MouseButton b)
 {
     return b.GetMappedState(CurrentMouseState) == ButtonState.Released && b.GetMappedState(PreviousMouseState) == ButtonState.Pressed;
 }
开发者ID:SSX1,项目名称:Space-Station-X1,代码行数:9,代码来源:InputManager.cs

示例2: IsButtonUp

 /// <summary>
 /// Gets if the mouse button is up.
 /// </summary>
 /// <param name="b">The MouseButton to check.</param>
 /// <returns>`true` if the mouse button is up, `false` otherwise.</returns>
 public bool IsButtonUp(MouseButton b)
 {
     return b.GetMappedState(CurrentMouseState) == ButtonState.Released;
 }
开发者ID:SSX1,项目名称:Space-Station-X1,代码行数:9,代码来源:InputManager.cs

示例3: IsButtonPreviouslyUp

 /// <summary>
 /// Gets if the mouse button was up in the previous frame.
 /// </summary>
 /// <param name="b">The MouseButton to check.</param>
 /// <returns>`true` if the mouse button was up, `false` otherwise.</returns>
 public bool IsButtonPreviouslyUp(MouseButton b)
 {
     return b.GetMappedState(PreviousMouseState) == ButtonState.Released;
 }
开发者ID:SSX1,项目名称:Space-Station-X1,代码行数:9,代码来源:InputManager.cs

示例4: IsButtonPreviouslyDown

 /// <summary>
 /// Gets if the mouse button was down in the previous frame.
 /// </summary>
 /// <param name="b">The MouseButton to check.</param>
 /// <returns>`true` if the mouse button was down, `false` otherwise.</returns>
 public bool IsButtonPreviouslyDown(MouseButton b)
 {
     return b.GetMappedState(PreviousMouseState) == ButtonState.Pressed;
 }
开发者ID:SSX1,项目名称:Space-Station-X1,代码行数:9,代码来源:InputManager.cs

示例5: IsButtonDown

 /// <summary>
 /// Gets if the mouse button is down.
 /// </summary>
 /// <param name="b">The MouseButton to check.</param>
 /// <returns>`true` if the mouse button is down, `false` otherwise.</returns>
 public bool IsButtonDown(MouseButton b)
 {
     return b.GetMappedState(CurrentMouseState) == ButtonState.Pressed;
 }
开发者ID:SSX1,项目名称:Space-Station-X1,代码行数:9,代码来源:InputManager.cs

示例6: GetPreviousButtonState

 /// <summary>
 /// Gets the state for the passed mouse button in the last frame.
 /// </summary>
 /// <param name="b">The mouse button to check.</param>
 /// <returns>The ButtonState for the mouse in the last frame.</returns>
 public ButtonState GetPreviousButtonState(MouseButton b)
 {
     return b.GetMappedState(PreviousMouseState);
 }
开发者ID:SSX1,项目名称:Space-Station-X1,代码行数:9,代码来源:InputManager.cs

示例7: GetButtonState

 /// <summary>
 /// Gets the state for the passed mouse button.
 /// </summary>
 /// <param name="b">The mouse button to check.</param>
 /// <returns>The ButtonState for the mouse in this frame.</returns>
 public ButtonState GetButtonState(MouseButton b)
 {
     return b.GetMappedState(CurrentMouseState);
 }
开发者ID:SSX1,项目名称:Space-Station-X1,代码行数:9,代码来源:InputManager.cs


注:本文中的MouseButton.GetMappedState方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。