| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 | 
							- using UnityEngine;
 
- namespace GFGGame
 
- {
 
-     public class ErrorCodeController
 
-     {
 
-         //返回结果为true时,表示可以在错误提示后继续处理后续逻辑
 
-         public static bool Handler(int errorCode)
 
-         {
 
-             switch (errorCode)
 
-             {
 
-                 case ET.ErrorCode.ERR_NetWorkError:
 
-                     {
 
-                         AlertSystem.Show("网络异常,也有可能是服务器异常,请稍后再试!")
 
-                         .SetRightButton(true, "好的", (object data) =>
 
-                         {
 
-                             GameController.QuitToLoginView(false);
 
-                         });
 
-                     }
 
-                     break;
 
-                 case ET.ErrorCode.ERR_ClientVersionError:
 
-                     {
 
-                         AlertSystem.Show("客户端版本错误,请联系研发获取最新版本!")
 
-                             .SetLeftButton(true, "知道了", (data) =>
 
-                             {
 
-                                 Application.Quit();
 
-                             });
 
-                     }
 
-                     break;
 
-                 case ET.ErrorCode.ERR_RegisterCountFull:
 
-                     {
 
-                         AlertSystem.Show("游戏已爆满,暂停注册,敬请期待!")
 
-                               .SetLeftButton(true, "好的", (data) =>
 
-                               {
 
-                                   GameController.QuitToLoginView(true);
 
-                               });
 
-                     }
 
-                     break;
 
-                 case ET.ErrorCode.Err_LoginCountFull:
 
-                     {
 
-                         AlertSystem.Show("游戏已爆满,请稍后再试!")
 
-                               .SetLeftButton(true, "好的", (data) =>
 
-                               {
 
-                                   GameController.QuitToLoginView(true);
 
-                               });
 
-                     }
 
-                     break;
 
-                 case ET.ErrorCode.Err_ServerMaintain:
 
-                     {
 
-                         AlertSystem.Show("服务器维护中,请稍后再试!")
 
-                             .SetLeftButton(true, "好的", (data) =>
 
-                             {
 
-                                 GameController.QuitToLoginView(true);
 
-                             });
 
-                     }
 
-                     break;
 
-                 case ET.ErrorCode.ERR_AntiAddiction:
 
-                     {
 
-                         AntiAddictionController.ShowAntiAddictionAlert();
 
-                         return false;
 
-                     }
 
-                 default:
 
-                     if (ErrorCodeCfgArray.Instance.GetCfg(errorCode) != null)
 
-                     {
 
-                         PromptController.Instance.ShowFloatTextPrompt(ErrorCodeCfgArray.Instance.GetCfg(errorCode).tips);
 
-                         ET.Log.Debug("errorCode" + errorCode.ToString());
 
-                     }
 
-                     else
 
-                     {
 
-                         PromptController.Instance.ShowFloatTextPrompt("errorCode " + errorCode.ToString());
 
-                         ET.Log.Error("errorCode" + errorCode.ToString());
 
-                     }
 
-                     return true;
 
-             }
 
-             return false;
 
-         }
 
-     }
 
- }
 
 
  |