Ejemplo n.º 1
0
    void Awake()
    {
        if (key.Length == 0)
        {
            LogSys.LogWarning("key is empty");
            return;
        }
        string str = "";

        if (FromLua == false || !sluaAux.luaSvrManager.getInstance().IsLoaded)
        {
            str = GameText.GetStr(key);
        }
        else
        {
            SLua.LuaState ls = sluaAux.luaSvrManager.getInstance().GetLuaState();
            if (ls != null)
            {
                SLua.LuaTable tb = ls.getTable("LuaText");
                if (tb[key] == null)
                {
                    str = GameText.GetStr(key);
                }
                else
                {
                    str = tb[key].ToString();
                }
            }
        }
        gameObject.GetComponent <UILabel>().text = UtilTools.Wrap(str);
    }
Ejemplo n.º 2
0
        //step4:socket连接完成
        void StartUp_step4()
        {
            LogSys.LogWarning("-----> _startUpStep = 4;");
            _startUpStep = 4;
//            ChangeAccountController.SendLoginMsg();
            //TODO 假设登陆成功
//            GameDataMgr.LOGIN_DATA.IsLoginGameServer = true;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 根据key获取单挑数据
 /// </summary>
 /// <param name="key">key</param>
 /// <returns></returns>
 public T GetDataByKey(string key)
 {
     if (ConfigDataDic.ContainsKey(key))
     {
         return(ConfigDataDic[key]);
     }
     LogSys.LogWarning(string.Format("表【{0}】未找到key【{1}】", fileName, key));
     return(null);
     //return ConfigDataDic.GetValue(key, null);
 }
Ejemplo n.º 4
0
    public void LoginTouris()
    {
        if (winObject == null)
        {
            return;
        }
//        _mono.winBg.SetActive(true);
        JARUtilTools tools = GameSceneManager.uiCameraObj.GetComponent <JARUtilTools>();

        if (tools != null)
        {
            LogSys.LogWarning("LoginInputController:LoginTouris:    DeviceUUID==" + tools.GetDeviceUUID());
//            Login(tools.GetDeviceUUID(),"aaa");
            GameDataMgr.PLAYER_DATA.IsTouris = true;
        }
        else
        {
            _mono.winBg.SetActive(true);
        }
    }
Ejemplo n.º 5
0
    /*public JSONObject GetAllUserList()
     * {
     *
     * }*/

    /// <summary>
    /// 快速登陆
    /// </summary>
    /// <returns></returns>
    public IEnumerator registerToAccountServerFast()
    {
        /*string _uuid = GameDataMgr.LOGIN_DATA.GetFastLoginUUID();
         * WWWForm dataForm = new WWWForm();
         * string _code = _uuid + "," + GameDataMgr.LOGIN_DATA.GetFastLoginKey();
         * dataForm.AddField("type", "0");
         * dataForm.AddField("code", _code);
         * dataForm.AddField("t", "oauth");*/
        string       devid = "";
        JARUtilTools tools = GameSceneManager.uiCameraObj.GetComponent <JARUtilTools>();

        if (tools != null)
        {
            devid = tools.GetIMEI(); //"fdsfd2";//
        }
        if (string.IsNullOrEmpty(devid))
        {
            devid = GameDataMgr.LOGIN_DATA.GetFastLoginUUID();
        }


        //Post数据表
        WWWForm dataForm = new WWWForm();

        dataForm.AddField("type", "0");
        string code = GameDataMgr.LOGIN_DATA.GetFastLoginUUID() + "," + GameDataMgr.LOGIN_DATA.GetFastLoginKey();

        dataForm.AddField("code", code);
        dataForm.AddField("t", "oauth");

        dataForm.AddField("qid", SDKManager.Q_ID);
        dataForm.AddField("devid", devid);
        dataForm.AddField("simid", "");
        dataForm.AddField("logintype", ClientDefine.PLAT_FORM_TYPE);
        WWW w = new WWW(sdk.SDKManager.FastLoginURL, dataForm);

        yield return(w);

        if (string.IsNullOrEmpty(w.error))
        {
            if (w.isDone)
            {
                Debug.LogError(w.text);
                bool bRlt = GameDataMgr.LOGIN_DATA.parseAccountReturn(w.text, true);
                LogSys.LogWarning("----->a= print fast word ======" + bRlt);
                if (bRlt)
                {
//                    LogSys.LogWarning("-----> print fast word ======"+w.text);
                    GameDataMgr.LOGIN_DATA.SaveFastLoginInfo();
                    GameDataMgr.PLAYER_DATA.IsTouris = true;
                    if (!ClientNetwork.Instance.IsConnected())
                    {
                        ClientNetwork.Instance.Connect();
                    }
                }
                else
                {
                    UIManager.CreateWin(UIName.LOGIN_INPUT_WIN);
                    var versionUpdate = startUpMono.transform.Find("VersionUpdate").GetComponent <VersionUpdate>();
                    versionUpdate.ShowLoginBtn();
                }
            }
        }
        else
        {
            UtilTools.HideWaitWin();
            UtilTools.MessageDialog(w.error, okCallbackFunc: ReturnToLogin);
        }
    }
Ejemplo n.º 6
0
//    #if UNITY_EDITOR

    private void PrintNeed()
    {
        LogSys.LogWarning("sCurName = " + _sCurName + "   nType = " + _nType + "   nCost = " + _nCost +
                          "   _nCurKey = " + _nCurKey + "   sCurDes=" + _sCurDes);
    }