Bladeren bron

增加登录选服功能;美化登录UI

大爷 1 jaar geleden
bovenliggende
commit
9f043ed938

+ 4 - 11
FGUIProject/assets/Login/Btn_ContinueGame.xml

@@ -1,18 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="163,54" extention="Button">
+<component size="336,128" pivot="0.5,0.5" extention="Button">
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <displayList>
-    <image id="n0_pdjl" name="n0" src="pdjl6" fileName="UI_LoginBtn.PNG" xy="0,0">
-      <gearDisplay controller="button" pages="0,2"/>
-      <relation target="" sidePair="width-width,height-height"/>
-    </image>
-    <image id="n1_pdjl" name="n1" src="pdjl7" fileName="UI_LoginBtn_ONpressed.png" xy="0,0">
-      <gearDisplay controller="button" pages="1,3"/>
-      <relation target="" sidePair="width-width,height-height"/>
-    </image>
-    <text id="n2_pdjl" name="title" xy="1,0" size="159,54" font="ui://btak13q2brolh" fontSize="20" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" singleLine="true" text="继续游戏">
+    <image id="n3_px1c" name="n3" src="px1csl" fileName="btn.png" xy="0,64" pivot="0,0.5" anchor="true"/>
+    <text id="n2_pdjl" name="title" xy="0,0" size="332,128" font="Microsoft YaHei" fontSize="50" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" strokeColor="#0044cc" outlineSoftness="0.1" singleLine="true" text="启动">
       <relation target="" sidePair="width-width,height-height"/>
     </text>
   </displayList>
-  <Button/>
+  <Button downEffect="scale" downEffectValue=".8"/>
 </component>

+ 23 - 0
FGUIProject/assets/Login/ComboBox1.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="260,60" extention="ComboBox" bgColorEnabled="true" bgColor="#33cccc">
+  <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
+  <displayList>
+    <graph id="n0_px1c" name="n0" xy="0,0" size="260,60" touchable="false" type="rect" lineSize="0" fillColor="#fff0f0f0">
+      <gearDisplay controller="button" pages="0"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <graph id="n1_px1c" name="n1" xy="0,0" size="260,60" touchable="false" type="rect" lineSize="0" fillColor="#fffafafa">
+      <gearDisplay controller="button" pages="2"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <graph id="n2_px1c" name="n2" xy="0,0" size="260,60" touchable="false" type="rect" lineSize="0" fillColor="#ffcccccc">
+      <gearDisplay controller="button" pages="1,3"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <text id="n3_px1c" name="title" xy="0,0" size="224,62" font="Microsoft YaHei" fontSize="40" vAlign="middle" autoSize="none" singleLine="true" text="4k">
+      <relation target="" sidePair="width-width,height-height"/>
+    </text>
+    <image id="n6_a7gi" name="n6" src="a7gisu" fileName="b3.png" xy="221,14" scale="1.5,1.5"/>
+  </displayList>
+  <ComboBox dropdown="ui://2jxt4hn8px1css"/>
+</component>

+ 18 - 0
FGUIProject/assets/Login/ComboBox1_item.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="460,60" extention="Button">
+  <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
+  <displayList>
+    <graph id="n0_px1c" name="n0" xy="0,0" size="460,60" touchable="false" type="rect" lineSize="0" fillColor="#ff3399ff">
+      <gearDisplay controller="button" pages="2"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <graph id="n1_px1c" name="n1" xy="0,0" size="460,60" touchable="false" type="rect" lineSize="0" fillColor="#ffcccccc">
+      <gearDisplay controller="button" pages="1,3"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <text id="n2_px1c" name="title" xy="0,0" size="460,62" font="Microsoft YaHei" fontSize="40" vAlign="middle" autoSize="none" singleLine="true" text="">
+      <relation target="" sidePair="width-width,height-height"/>
+    </text>
+  </displayList>
+  <Button mode="Radio"/>
+</component>

+ 12 - 0
FGUIProject/assets/Login/ComboBox1_popup.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="460,400">
+  <displayList>
+    <graph id="n0_px1c" name="n0" xy="0,0" size="460,400" touchable="false" type="rect" lineColor="#ffa0a0a0" fillColor="#ffccffff">
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <list id="n1_px1c" name="list" xy="0,0" size="460,200" overflow="scroll" defaultItem="ui://2jxt4hn8px1csr">
+      <relation target="" sidePair="width-width"/>
+    </list>
+  </displayList>
+  <relation target="n1_px1c" sidePair="height-height"/>
+</component>

+ 23 - 0
FGUIProject/assets/Login/ComboBox2.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="460,60" extention="ComboBox">
+  <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
+  <displayList>
+    <graph id="n0_sx4d" name="n0" xy="0,0" size="460,60" touchable="false" type="rect" lineSize="0" fillColor="#fff0f0f0">
+      <gearDisplay controller="button" pages="0"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <graph id="n1_sx4d" name="n1" xy="0,0" size="460,60" touchable="false" type="rect" lineSize="0" fillColor="#fffafafa">
+      <gearDisplay controller="button" pages="2"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <graph id="n2_sx4d" name="n2" xy="0,0" size="460,60" touchable="false" type="rect" lineSize="0" fillColor="#ffcccccc">
+      <gearDisplay controller="button" pages="1,3"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <text id="n3_sx4d" name="title" xy="0,0" size="421,62" font="Microsoft YaHei" fontSize="38" vAlign="middle" autoSize="none" singleLine="true" text="">
+      <relation target="" sidePair="width-width,height-height"/>
+    </text>
+    <image id="n4_sx4d" name="n4" src="a7gisu" fileName="b3.png" xy="427,20"/>
+  </displayList>
+  <ComboBox dropdown="ui://2jxt4hn8sx4dsx"/>
+</component>

+ 18 - 0
FGUIProject/assets/Login/ComboBox2_item.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="460,60" extention="Button">
+  <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
+  <displayList>
+    <graph id="n0_sx4d" name="n0" xy="0,0" size="460,60" touchable="false" type="rect" lineSize="0" fillColor="#ff3399ff">
+      <gearDisplay controller="button" pages="2"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <graph id="n1_sx4d" name="n1" xy="0,0" size="460,60" touchable="false" type="rect" lineSize="0" fillColor="#ffcccccc">
+      <gearDisplay controller="button" pages="1,3"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <text id="n2_sx4d" name="title" xy="0,0" size="460,62" font="Microsoft YaHei" fontSize="38" vAlign="middle" autoSize="none" singleLine="true" text="">
+      <relation target="" sidePair="width-width,height-height"/>
+    </text>
+  </displayList>
+  <Button mode="Radio"/>
+</component>

+ 12 - 0
FGUIProject/assets/Login/ComboBox2_popup.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="460,388">
+  <displayList>
+    <graph id="n0_sx4d" name="n0" xy="0,0" size="460,388" touchable="false" type="rect" lineColor="#ffa0a0a0" fillColor="#fff0f0f0">
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <list id="n1_sx4d" name="list" xy="0,0" size="460,200" overflow="scroll" defaultItem="ui://2jxt4hn8sx4dsw">
+      <relation target="" sidePair="width-width"/>
+    </list>
+  </displayList>
+  <relation target="n1_sx4d" sidePair="height-height"/>
+</component>

+ 8 - 17
FGUIProject/assets/Login/Login.xml

@@ -1,22 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="900,1600">
+<component size="1125,2000">
   <displayList>
-    <image id="n31_j5ra" name="n31" src="j5rasi" fileName="loginbg.png" xy="0,0"/>
-    <component id="n12_8ibs" name="Btn_Login" src="pdjlb" fileName="Btn_StartGame.xml" xy="316,984" size="297,64" group="n16_8ibs">
-      <Button titleColor="#ffffff" titleFontSize="40"/>
+    <image id="n34_px1c" name="n34" src="px1csj" fileName="背景.png" xy="0,0" size="1125,2000"/>
+    <text id="n23_rwz6" name="Text_Version" xy="0,1703" size="1125,292" fontSize="26" color="#ffffff" align="right" vAlign="bottom" autoSize="none" strokeColor="#0044ff" strokeSize="0.15" text="Version:1"/>
+    <image id="n35_px1c" name="n35" src="px1c8t" fileName="logo.png" xy="800,751" pivot="0.5,0.5" anchor="true"/>
+    <component id="n36_px1c" name="comp_login" src="px1csp" fileName="gLoginInfo.xml" xy="0,1168"/>
+    <component id="n38_sx4d" name="listServer" src="sx4dsy" fileName="ComboBox2.xml" xy="650,81">
+      <ComboBox visibleItemCount="10"/>
     </component>
-    <image id="n28_j5ra" name="n28" src="pdjl8" fileName="UI_LoginInput.PNG" xy="266,838" size="368,47" group="n16_8ibs"/>
-    <text id="n25_j5ra" name="input_name" xy="316,838" size="293,46" group="n16_8ibs" fontSize="30" color="#ffffff" vAlign="middle" autoSize="none" text="" input="true" prompt="[i][color=#999999]输入用户名&#xA;[/color][/i]" maxLength="16" keyboardType="1"/>
-    <image id="n29_j5ra" name="n29" src="pdjl8" fileName="UI_LoginInput.PNG" xy="266,906" size="368,47" group="n16_8ibs"/>
-    <text id="n30_j5ra" name="input_password" xy="316,906" size="293,46" group="n16_8ibs" font="ui://btak13q2brolh" fontSize="30" color="#ffffff" vAlign="middle" autoSize="none" text="" input="true" prompt="[i][color=#999999]输入密码[/color][/i]" maxLength="16" keyboardType="1" password="true"/>
-    <text id="n33_a12q" name="txt_tips" xy="6,1073" size="888,254" group="n16_8ibs" visible="false" fontSize="24" color="#ff3300" align="center" ubb="true" autoSize="none" strokeColor="#ff9900" strokeSize="0.05" text=""/>
-    <image id="n32_a12q" name="img_tips" src="pxxk1" fileName="UIMajorCity_48.PNG" xy="400,1065" group="n16_8ibs" visible="false"/>
-    <group id="n16_8ibs" name="Gro_LoginInfo" xy="6,838" size="888,489"/>
-    <text id="n23_rwz6" name="Text_Version" xy="0,1213" size="865,343" fontSize="20" color="#ffffff" align="right" vAlign="bottom" autoSize="none" text="Version:1"/>
   </displayList>
-  <transition name="t1">
-    <item time="0" type="Pivot" target="n32_a12q" value="0.5,0.5"/>
-    <item time="0" type="Rotation" target="n32_a12q" value="0"/>
-    <item time="12" type="Rotation" target="n32_a12q" value="360"/>
-  </transition>
+  <transition name="t1"/>
 </component>

BIN
FGUIProject/assets/Login/b3.png


BIN
FGUIProject/assets/Login/btn.png


+ 18 - 0
FGUIProject/assets/Login/gLoginInfo.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="1125,800">
+  <displayList>
+    <image id="n36_px1c" name="n36" src="px1csk" fileName="输入底.png" xy="562,111" pivot="0.5,0" anchor="true" size="1000,110"/>
+    <text id="n38_px1c" name="txtID" xy="93,116" size="941,93" fontSize="50" color="#ffffff" vAlign="middle" autoSize="none" strokeColor="#0044cc" strokeSize="0.1" outlineSoftness="1" text="" input="true"/>
+    <text id="n39_px1c" name="n39" xy="64,0" size="1061,108" font="Microsoft YaHei" fontSize="50" color="#ffffff" vAlign="bottom" autoSize="none" strokeColor="#0044cc" text="请输入直播间ID:"/>
+    <component id="n40_px1c" name="btn_go" src="brolsg" fileName="Btn_ContinueGame.xml" xy="562,374" pivot="0.5,0" anchor="true"/>
+    <text id="n41_px1c" name="txt_tips" xy="74,506" size="994,272" visible="false" fontSize="32" color="#ff3300" align="center" ubb="true" autoSize="none" strokeColor="#ff9900" strokeSize="0.05" text=""/>
+    <image id="n42_px1c" name="img_tips" src="pxxk1" fileName="UIMajorCity_48.PNG" xy="512,238" visible="false"/>
+    <component id="n44_px1c" name="listResolution" src="px1cst" fileName="ComboBox1.xml" xy="73,264" size="260,60">
+      <ComboBox title="分辨率4K" visibleItemCount="10"/>
+    </component>
+  </displayList>
+  <transition name="t1" autoPlay="true" autoPlayRepeat="-1">
+    <item time="0" type="Pivot" target="n42_px1c" value="0.5,0.5"/>
+    <item time="0" type="Rotation" target="n42_px1c" tween="true" startValue="0" endValue="360" duration="12"/>
+  </transition>
+</component>

+ 6 - 0
FGUIProject/assets/Login/listItem.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="300,60">
+  <displayList>
+    <text id="n0_a7gi" name="n0" xy="3,14" size="300,62" font="Microsoft YaHei" fontSize="46" autoSize="none" text="sss"/>
+  </displayList>
+</component>

BIN
FGUIProject/assets/Login/logo.png


+ 13 - 0
FGUIProject/assets/Login/package.xml

@@ -10,6 +10,19 @@
     <component id="brolsg" name="Btn_ContinueGame.xml" path="/"/>
     <image id="j5rasi" name="loginbg.png" path="/"/>
     <image id="pxxk1" name="UIMajorCity_48.PNG" path="/"/>
+    <image id="px1csj" name="背景.png" path="/"/>
+    <image id="px1c8t" name="logo.png" path="/"/>
+    <image id="px1csk" name="输入底.png" path="/"/>
+    <image id="px1csl" name="btn.png" path="/"/>
+    <component id="px1csp" name="gLoginInfo.xml" path="/" exported="true"/>
+    <component id="px1csr" name="ComboBox1_item.xml" path="/"/>
+    <component id="px1css" name="ComboBox1_popup.xml" path="/"/>
+    <component id="px1cst" name="ComboBox1.xml" path="/"/>
+    <image id="a7gisu" name="b3.png" path="/"/>
+    <component id="a7gisv" name="listItem.xml" path="/" exported="true"/>
+    <component id="sx4dsw" name="ComboBox2_item.xml" path="/"/>
+    <component id="sx4dsx" name="ComboBox2_popup.xml" path="/"/>
+    <component id="sx4dsy" name="ComboBox2.xml" path="/"/>
   </resources>
   <publish name="" genCode="true"/>
 </packageDescription>

BIN
FGUIProject/assets/Login/背景.png


BIN
FGUIProject/assets/Login/输入底.png


BIN
Unity/Assets/Res/FGUI/Login_atlas0.png


BIN
Unity/Assets/Res/FGUI/Login_fui.bytes


+ 3 - 3
Unity/Assets/Scenes/Init.unity

@@ -38,7 +38,7 @@ RenderSettings:
   m_ReflectionIntensity: 1
   m_CustomReflection: {fileID: 0}
   m_Sun: {fileID: 0}
-  m_IndirectSpecularColor: {r: 0.5342607, g: 0.8328695, b: 0.9652136, a: 1}
+  m_IndirectSpecularColor: {r: 0.24320278, g: 0.650905, b: 0.9081077, a: 1}
   m_UseRadianceAmbientProbe: 0
 --- !u!157 &3
 LightmapSettings:
@@ -1114,8 +1114,8 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   scaleMode: 1
   screenMatchMode: 0
-  designResolutionX: 1600
-  designResolutionY: 2500
+  designResolutionX: 1125
+  designResolutionY: 2000
   fallbackScreenDPI: 96
   defaultSpriteDPI: 96
   constantScaleFactor: 1

+ 5 - 11
Unity/Assets/Scripts/Codes/Hotfix/Client/Login/LoginHelper.cs

@@ -6,7 +6,7 @@ namespace ET.Client
 {
     public static class LoginHelper
     {
-        public static async ETTask<int> Login(Scene clientScene, string account, string password)
+        public static async ETTask<int> Login(Scene clientScene, string ip, int port, string account, string password)
         {
             try
             {
@@ -16,18 +16,12 @@ namespace ET.Client
                 clientScene.RemoveComponent<SessionComponent>();
                 clientScene.RemoveComponent<AccountInfoComponent>();
                 
-
                 // 获取路由跟realmDispatcher地址
-                RouterAddressComponent routerAddressComponent = clientScene.GetComponent<RouterAddressComponent>();
-                if (routerAddressComponent == null)
-                {
-                    routerAddressComponent =
-                            clientScene.AddComponent<RouterAddressComponent, string, int>(ConstValue.RouterHttpHost, ConstValue.RouterHttpPort);
-                    await routerAddressComponent.Init();
-
-                    clientScene.AddComponent<NetClientComponent, AddressFamily>(routerAddressComponent.RouterManagerIPAddress.AddressFamily);
-                }
+                var routerAddressComponent =
+                        clientScene.AddComponent<RouterAddressComponent, string, int>(ip, port);
+                await routerAddressComponent.Init();
 
+                clientScene.AddComponent<NetClientComponent, AddressFamily>(routerAddressComponent.RouterManagerIPAddress.AddressFamily);
                 IPEndPoint realmAddress = routerAddressComponent.GetRealmAddress(account);
 
                 // 登陆验证

+ 85 - 9
Unity/Assets/Scripts/Codes/HotfixView/Client/UI/UILogin/AppStartInitFinish_CreateLoginUI.cs

@@ -1,6 +1,10 @@
 using Cysharp.Threading.Tasks;
 using FairyGUI;
 using Sirenix.Utilities;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
 using UnityEngine;
 
 namespace ET.Client
@@ -8,6 +12,9 @@ namespace ET.Client
     [Event(SceneType.Client)]
     public class AppStartInitFinish_CreateLoginUI : AEvent<EventType.AppStartInitFinish>
     {
+        private string mIP;
+        private int mPort;
+
         protected override async ETTask Run(Scene scene, EventType.AppStartInitFinish args)
         {
             Log.Debug("to load login ui.");
@@ -19,27 +26,95 @@ namespace ET.Client
             UIPackage.RemovePackage("CheckForResUpdate");
         }
 
+        private void InitServerList(GComboBox list)
+        {
+            var saveip = GameSetting.Instance.GetString(GameSetting.Sets.Server_str);
+
+            int select = -1;
+            List<string> servers = new();
+            foreach (var info in ServerInfo.ServerList)
+            {
+                servers.Add(info.ShowName);
+
+                if (select < 0 && !saveip.IsNullOrWhitespace())
+                {
+                    if (saveip == info.HostStr)
+                    {
+                        select = servers.Count - 1;
+                    }
+                }
+            }
+            if(select < 0 && !saveip.IsNullOrWhitespace())
+            {
+                try
+                {
+                    var ipendpoint = NetworkHelper.ToIPEndPoint(saveip);
+
+                    servers.Add($"Custom[{saveip}]");
+                    ServerInfo.ServerList.Append(new ServerInfo()
+                    {
+                        ShowName = $"Custom[{saveip}]",
+                        Ip = ipendpoint.Address.ToString(),
+                        Port = ipendpoint.Port,
+                    }) ;
+                    select = servers.Count - 1;
+                }
+                catch(Exception)
+                {
+                    Log.Error($"error save ip: {saveip}");
+                }
+            }
+            if(select < 0)
+            {
+                select = 0;
+            }
+            var cur = ServerInfo.ServerList[select];
+            mIP = cur.Ip;
+            mPort = cur.Port;
+
+            list.items = servers.ToArray();
+            list.selectedIndex = select;
+            list.onChanged.Set(() =>
+            {
+                var info = ServerInfo.ServerList[list.selectedIndex];
+                GameSetting.Instance.SetString(GameSetting.Sets.Server_str, info.HostStr);
+
+                mIP = info.Ip;
+                mPort = info.Port;
+            });
+        }
+
+        private void InitResolutionList(GComboBox list)
+        {
+
+        }
+
         private void InitLogin(Scene scene, GComponent view)
         {
-            var account = view.GetChild("input_name");
-            var password = view.GetChild("input_password");
-            var btn = view.GetChild("Btn_Login");
+            var comp = view.GetChild("comp_login") as GComponent;
+            var listSvr = view.GetChild("listServer").asComboBox;
+            var listResolution = comp.GetChild("listResolution").asComboBox;
+            InitServerList(listSvr);
+            InitResolutionList(listResolution);
+
+            var inputID = comp.GetChild("txtID");
+            var btn = comp.GetChild("btn_go");
             btn.onClick.Add(async () =>
             {
-                var imgtips = view.GetChild("img_tips");
-                var tips = view.GetChild("txt_tips");
+                var imgtips = comp.GetChild("img_tips");
+                var tips = comp.GetChild("txt_tips");
                 tips.visible = false;
                 imgtips.visible = false;
-                if (account.text.IsNullOrWhitespace() || password.text.IsNullOrWhitespace())
+                /*if (account.text.IsNullOrWhitespace() || password.text.IsNullOrWhitespace())
                 {
                     tips.visible = true;
                     tips.text = "用户名或密码为空";
                     return;
-                }
+                }*/
 
                 imgtips.visible = true;
                 btn.enabled = false;
-                var ret = await LoginHelper.Login(scene, account.text, password.text);
+                var ret = await LoginHelper.Login(scene, mIP, mPort, "111", "111");
                 if (ret != ErrorCode.ERR_Success)
                 {
                     imgtips.visible = false;
@@ -55,7 +130,8 @@ namespace ET.Client
                     {
                         tips.text = "连接服务器过程中出现了问题\n" +
                                                 "如重试后还是不行,请与客服联系" +
-                                                "\n[color=#FFCCCC][b]QQ: 400888666[/b][/color]  微信:[color=#FFCCCC][b]大老板[/color][/b]";
+                                                "\n[color=#FF0000]QQ: 2910280670[/color]" +
+                                                "\n微信:[color=#FF0000]lvlh117[/color]";
                     }
                 }
             });

+ 13 - 0
Unity/Assets/Scripts/Codes/Model/Client/GameSetting.cs

@@ -7,6 +7,7 @@ namespace ET
         public enum Sets
         {
             Mute_int,
+            Server_str,
         }
 
         public bool GetBool(Sets sets)
@@ -19,5 +20,17 @@ namespace ET
             var key = sets.ToString();
             PlayerPrefs.SetInt(key, value ? 1 : 0);
         }
+
+        public string GetString(Sets sets)
+        {
+            var key = sets.ToString();
+            return PlayerPrefs.GetString(key);
+        }
+
+        public void SetString(Sets sets, string value)
+        {
+            var keys = sets.ToString();
+            PlayerPrefs.SetString(keys, value);
+        }
     }
 }

+ 30 - 0
Unity/Assets/Scripts/Codes/Model/Client/Login/ServerInfo.cs

@@ -0,0 +1,30 @@
+namespace ET.Client
+{
+    public class ServerInfo
+    {
+        public string ShowName;
+        public string Ip;
+        public int Port;
+
+        public string HostStr { get { return Ip + ":" + Port; } }
+
+        public static ServerInfo[] ServerList;
+        static ServerInfo()
+        {
+            ServerList = new[]{
+                new ServerInfo{
+                    ShowName = "本地[localhost:303000]",
+                    Ip = "127.0.0.1",
+                    Port = 30300
+                },
+                new ServerInfo{
+                    ShowName = "外网[47.122.5.112:303000]",
+                    Ip = "47.122.5.112",
+                    Port = 30300
+                },
+            };
+        }
+    }
+
+     
+}

+ 11 - 0
Unity/Assets/Scripts/Codes/Model/Client/Login/ServerInfo.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0b66ce9802eff9c4caf6a0fcb6064e1a
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 1 - 1
Unity/Assets/Scripts/Codes/Model/Unity.Model.Codes.asmdef

@@ -17,5 +17,5 @@
         "ENABLE_CODES"
     ],
     "versionDefines": [],
-    "noEngineReferences": true
+    "noEngineReferences": false
 }

+ 1 - 1
Unity/Assets/Scripts/Loader/MonoBehaviour/Init.cs

@@ -9,7 +9,7 @@ namespace ET
 		private void Awake()
 		{
 #if UNITY_STANDALONE_WIN
-			Screen.SetResolution(675, 1080, false);
+			Screen.SetResolution(608, 1080, false);
 #endif
 #if UNITY_EDITOR
 			//Editor模式下去掉debug浮窗插件