简体   繁体   中英

Libgdx | How to render game when not in focus?

How do I render and update my game on desktop when i'm not clicked on the game window? I want it to always render, even in the background. Thanks!

Wyatt, in your game's main class, override pause(). If your main class implements ApplicationListener, this is done automatically. Remove super.pause() from within the override and the game will render even in the background.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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