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.
我正在开发 Java3D 游戏。我从一个文件中读取了我所有的关卡信息,它工作正常。但现在我想通过从不同文件中读取数据来重新初始化场景。
如何重置场景?
我应该只销毁整个 canvas3D 和 Universe 对象吗?
谢谢 Mikeb,你让我走上了正轨。
我想到了。您需要分离分支组。
像这样:
if (sceneBG != null) { sceneBG.detach(); } sceneBG = new BranchGroup(); sceneBG.setCapability(BranchGroup.ALLOW_DETACH);