Bladeren bron

增加选择服务器

zouyong 5 jaren geleden
bovenliggende
commit
e7e345272e

File diff suppressed because it is too large
+ 1713 - 133
tower_sanguo/assets/resources/module/loading/loading.prefab


+ 14 - 0
tower_sanguo/assets/scripts/module/loading/LoadingUI.ts

@@ -14,8 +14,12 @@ export default class LoadingUI extends BaseUI {
 
     @property(cc.EditBox)
     lbl_usename: cc.EditBox = null;
+    @property(cc.EditBox)
+    lbl_server: cc.EditBox = null;
     @property(cc.Button)
     btn_login: cc.Button = null;
+    @property(cc.ToggleContainer)
+    toogle: cc.ToggleContainer = null;
 
     onLoad() {
         this.ui = this.node.addComponent(LoadingNode);
@@ -29,10 +33,20 @@ export default class LoadingUI extends BaseUI {
 
     clickLogin() {
         GameController.http.mac = this.lbl_usename.string;
+        GameController.http.serverUrl = this.lbl_server.string;
         GameController.storageData.setStorage("testmac", GameController.http.mac, 1);
         GameController.login();
     }
 
+    clickServer(){
+        if(this.toogle.toggleItems[0].isChecked){
+            this.lbl_server.string = 'https://tafang-test.duiweize.com/';
+        }
+        else{
+            this.lbl_server.string = 'http://172.16.15.167:9092/';
+        }
+    }
+
     start() {
 
     }

Some files were not shown because too many files changed in this diff