Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试找到 X 和 Y 位置,以便可以在游戏窗口的某个部分绘制图像,但我不知道如何执行此操作,也找不到有关如何执行此操作的任何信息,如果有人可以的话帮助将不胜感激,谢谢。
您可以从 Microsoft.Xna.Framework.Input 中的鼠标类获取鼠标状态;
MouseState mouseState = Mouse.GetState(); var x = mouseState.X; var y = mouseState.Y;