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.
我的问题很简单:
如何在 Box2dWeb 中重置或重新启动世界?
当玩家重新加载他正在玩的关卡时,我需要这样做。
更简单的方法是删除世界,然后重新创建它。
另一种方法是存储世界和每个物体的所有初始参数,并在需要重新启动时进行设置。不要忘记移除您在游戏中创建的身体(例如子弹),并创建您移除的身体(杀死敌人,收集奖金等)