* 移除World
(worldName: string)
| 121 | * 移除World |
| 122 | */ |
| 123 | public removeWorld(worldName: string): boolean { |
| 124 | const world = this._worlds.get(worldName); |
| 125 | if (!world) { |
| 126 | return false; |
| 127 | } |
| 128 | |
| 129 | // 销毁World |
| 130 | world.destroy(); |
| 131 | this._worlds.delete(worldName); |
| 132 | |
| 133 | logger.info(`移除World: ${worldName}`); |
| 134 | return true; |
| 135 | } |
| 136 | |
| 137 | /** |
| 138 | * 获取World |