简体   繁体   English

如何在libgdx中禁用mouseMoved事件

[英]How to disable mouseMoved event in libgdx

I'm new in libgdx and I'm trying to create a 2D game. 我是libgdx的新手,正在尝试创建2D游戏。 I want to generate an action when I press a key, that's working perfectly with the render() method. 我想在按下一个键时生成一个动作,该动作与render()方法完美配合。

However, when I'm moving the mouse on the desktop, the render() method is called and my action is generated. 但是,当我在桌面上移动鼠标时,将调用render()方法并生成动作。

So my question is : How to disable mouseMoved event for don't call the render() method when I move the mouse ? 所以我的问题是:如何禁用mouseMoved事件,以便在移动鼠标时不调用render()方法?

Thanks 谢谢

您可以简单地重写mouseMoved方法,而不执行任何操作(保留一个空的正文)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM