浏览代码

added offlineServer()

ncannasse 9 年之前
父节点
当前提交
ee3ae0fb16
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      hxd/net/LocalHost.hx

+ 6 - 0
hxd/net/LocalHost.hx

@@ -114,6 +114,12 @@ class LocalHost extends NetworkHost {
 		isAuth = true;
 	}
 
+	public function offlineServer() {
+		close();
+		self = new LocalClient(this, null);
+		isAuth = true;
+	}
+
 	public static function openNewWindow( ?params : Dynamic<String> ) {
 		#if (flash && air3)
 		var opt = new flash.display.NativeWindowInitOptions();