简体   繁体   English

Lance GG : 可以激活游戏暂停吗?

[英]Lance GG : Is it posible to activate game pause?

Is it possible to add pause function to the game.是否可以在游戏中添加暂停功能。 Without setting all DynamicObject velocity to 0. Eg the pong game.不将所有 DynamicObject 速度设置为 0。例如乒乓球游戏。

Lance is a multiplayer game engine, so it wouldn't make sense to pause the game just for a single client - as the game must continue for all other players. Lance 是一个多人游戏引擎,因此只为一个客户端暂停游戏是没有意义的 - 因为游戏必须为所有其他玩家继续。

Nevertheless, there is an ignorePhysics attribute on the GameEngine class.尽管如此, GameEngine类中有一个ignorePhysics属性。 Setting this attribute to true on the server would stop the physics, and should work in interpolation mode.在服务器上将此属性设置为true将停止物理,并且应该在插值模式下工作。

To some extent, it would make sense with a global pause feature.在某种程度上,全局暂停功能是有意义的。 Think any modern MOBA - if a client disconnects, the game is paused to wait for a reconnect.想想任何现代 MOBA - 如果客户端断开连接,游戏将暂停以等待重新连接。 Unless of course, Lance.gg is only meant for persistent worlds :)除非当然,Lance.gg 仅适用于持久世界:)

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

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