Przeglądaj źródła

1.修改邮箱账号裁剪
2.修改陀螺仪页面限制
3.修改排行榜地区限制

slambb 2 lat temu
rodzic
commit
1a6ff6f97b

+ 36 - 8
Assets/BowArrow/Scripts/Manager/LoginMgr/RegisterView.cs

@@ -55,6 +55,7 @@ public class RegisterView : MonoBehaviour
 
     void Start()
     {
+
         InitInputLimit();
 
         //把账户视为手机号或者邮箱
@@ -390,7 +391,19 @@ public class RegisterView : MonoBehaviour
         InputField pwd1 = GetInputField(registerInPWD1);
         usrRecord = user.text;
         pwdRecord = pwd1.text;
-        InitPage(true); //前往完善用户信息
+        InputField nickname = GetInputField(registerInNickname);
+        if (_LoginValidateType == LoginValidateType.Email)
+        {
+            //邮箱裁剪一下
+            string[] arry = usrRecord.Trim().Split("@");
+            nickname.text = arry[0];
+        }
+        else
+        {
+            //手机直接设置电话号码
+            nickname.text = usrRecord;
+        }
+        InitPage(true);
         LoginView.ins.FillLoginInput(usrRecord, pwdRecord);
     }
     public void RegisterNext()
@@ -485,7 +498,17 @@ public class RegisterView : MonoBehaviour
                     if (res.code == 0) {
                         //设置默认名字,为当前注册的账户信息
                         InputField nickname = GetInputField(registerInNickname);
-                        nickname.text = usrRecord;
+                        if (_LoginValidateType == LoginValidateType.Email)
+                        {
+                            //邮箱裁剪一下
+                            string[] arry = usrRecord.Trim().Split("@");
+                            nickname.text = arry[0];
+                        }
+                        else {
+                            //手机直接设置电话号码
+                            nickname.text = usrRecord;
+                        }
+                       
                         InitPage(true); //前往完善用户信息
                         LoginView.ins.FillLoginInput(usrRecord, pwdRecord);
                     }
@@ -499,7 +522,17 @@ public class RegisterView : MonoBehaviour
                 if (res.code == 0) {
                     //设置默认名字,为当前注册的账户信息
                     InputField nickname = GetInputField(registerInNickname);
-                    nickname.text = usrRecord;
+                    if (_LoginValidateType == LoginValidateType.Email)
+                    {
+                        //邮箱裁剪一下
+                        string[] arry = usrRecord.Trim().Split("@");
+                        nickname.text = arry[0];
+                    }
+                    else
+                    {
+                        //手机直接设置电话号码
+                        nickname.text = usrRecord;
+                    }
                     InitPage(true); //前往完善用户信息
                     LoginView.ins.FillLoginInput(usrRecord, pwdRecord);
                 }
@@ -547,7 +580,6 @@ public class RegisterView : MonoBehaviour
             return;
         }
 
-        //string clippedString = text_nickname.Substring(0, 12);
         StartCoroutine(LoginController.Instance.CompleteUserInfo(
             usrRecord, pwdRecord, text_nickname, gender, text_birthday,
             countryCode, stateCode, cityCode 
@@ -555,10 +587,6 @@ public class RegisterView : MonoBehaviour
                 PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey(res.msg));
                 if (res.code == 0) {
                     GameObject.FindObjectOfType<LoginMgr>().showLoginView();
-
-                    //再处理一次名称记录
-                    //LoginMgr.myUserInfo.nickname = text_nickname;
-                    //LoginMgr.myUserInfo.Save();
                 }
             }
         ));

+ 4 - 4
Assets/SmartBow/Resources/SmartBow/Prefabs/Views/Home/RankingView.prefab

@@ -1544,7 +1544,7 @@ MonoBehaviour:
       m_Calls: []
   m_FontData:
     m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
-    m_FontSize: 28
+    m_FontSize: 36
     m_FontStyle: 1
     m_BestFit: 0
     m_MinSize: 0
@@ -2985,7 +2985,7 @@ MonoBehaviour:
       m_Calls: []
   m_FontData:
     m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
-    m_FontSize: 32
+    m_FontSize: 36
     m_FontStyle: 1
     m_BestFit: 0
     m_MinSize: 0
@@ -3141,7 +3141,7 @@ MonoBehaviour:
       m_Calls: []
   m_FontData:
     m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
-    m_FontSize: 28
+    m_FontSize: 36
     m_FontStyle: 1
     m_BestFit: 0
     m_MinSize: 0
@@ -3592,7 +3592,7 @@ MonoBehaviour:
       m_Calls: []
   m_FontData:
     m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
-    m_FontSize: 28
+    m_FontSize: 36
     m_FontStyle: 1
     m_BestFit: 0
     m_MinSize: 0

+ 15 - 2
Assets/SmartBow/Scripts/Views/GyrGuidanceView.cs

@@ -13,6 +13,8 @@ public class GyrGuidanceView : MonoBehaviour
     [SerializeField] List<GameObject> layouts;
 
     bool bAutoNext = false;
+    bool bGyrCompleted = false;
+    bool bCanNavTo = false;
 
     void Start()
     {
@@ -45,14 +47,24 @@ public class GyrGuidanceView : MonoBehaviour
             _button.SetActive(index == i);
         }
     }
-
+    IEnumerator SetCanNavTo() {
+        yield return new WaitForSeconds(1.0f);
+        bCanNavTo = true;
+    }
     void Update()
     {
+        if (AimHandler.ins.IsGyrCompleted() && !bGyrCompleted) {
+            bGyrCompleted = true;
+            //检测到已经初始化陀螺仪
+            StartCoroutine(SetCanNavTo());
+        }
         UpdateForGyr();    
     }
 
     void OnClick_Next()
     {
+        if (!bCanNavTo) return;
+
         if (AimHandler.ins.IsGyrCompleted() && !gyrCalibrating)
         {
             ViewManager2.HideView(ViewManager2.Path_GyrGuidanceView);
@@ -85,13 +97,14 @@ public class GyrGuidanceView : MonoBehaviour
         gyrCalibrating = !gyrCalibrating;
         if (gyrCalibrating)
         {
+            bAutoNext = true;
             AimHandler.ins.gyrCalibrateCompleteCount = 0;
             canUpdateGyrCalibrateProgress = true;
             flag_GyrCalibarateOperateAndFinish = 0;
-            bAutoNext = true;
         }
         else
         {
+            bAutoNext = false;
             canUpdateGyrCalibrateProgress = false;
             _TextAutoLanguage2.SetTextKey("Gyro_Reinitialize");
         }

+ 4 - 3
Assets/SmartBow/Scripts/Views/RankingVIewParts/BoxRankList.cs

@@ -96,7 +96,7 @@ public class BoxRankList : MonoBehaviour
                 }
                 else
                 {
-                    _country.GetComponent<Text>().text = "";
+                    _country.GetComponent<Text>().text = stateCode;
                 }
 
 
@@ -142,11 +142,12 @@ public class BoxRankList : MonoBehaviour
                 }
                 else
                 {
-                    o.transform.Find("Country").GetComponent<Text>().text = "";
+                    o.transform.Find("Country").GetComponent<Text>().text = stateCode;
                 }
             }
         };
-        UserPlayer.ins.call("rankComp.getRankList", new object[] { rankArea_copy, rankGameType_copy, countryCode, stateCode, cityCode }, cb);
+        //rankArea_copy == 0 ? 0 : 2
+        UserPlayer.ins.call("rankComp.getRankList", new object[] { rankArea_copy , rankGameType_copy, countryCode, stateCode, cityCode }, cb);
     }
     void ClearRankList()
     {