Browse Source

added offlineServer()

ncannasse 9 năm trước cách đây
mục cha
commit
ee3ae0fb16
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  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();