The advantages of adding a loop are that the loop is visible, and that you can control the rate of iterations through the loop if needed.
添加一个循环的好处在于循环是可见的,并且如果需要的话您可以通过循环控制迭代的速率。
A possible solution for this could be to keep updating the game at that rate, but reduce the rendering framerate. This can be done using following game loop.
一个可行的解决办法是保持更新的速度,而减少渲染的帧速率。
But a slow frame rate shouldn't interfere with the updating of the game. The way to achieve this is by using the following game loop.
而一个低的帧速率不应该妨碍游戏的更新。
应用推荐