コード例 #1
0
    private void OnApplicationFocus(bool focus)
    {
        if (focus)
        {
            //uniWebView.OnClose();
            //StartCoroutine(ShowLoading());
            isFirstJoin = false;
            OnLogin onLo = new OnLogin("Login", LoginInfo.Instance().mylogindata.user_id, LoginInfo.Instance().mylogindata.room_id.ToString(), LoginInfo.Instance().mylogindata.choosegame.ToString());
            string  str  = JsonMapper.ToJson(onLo);

            tcpNet.SendMessage(str);
            ClearInfo();

            StartCoroutine(GetHistory(
                               LoginInfo.Instance().mylogindata.URL +
                               LoginInfo.Instance().mylogindata.winHistory +
                               "game_id=" + LoginInfo.Instance().mylogindata.choosegame
                               ));
            StartCoroutine(OnReGet
                           (
                               LoginInfo.Instance().mylogindata.URL +
                               LoginInfo.Instance().mylogindata.newInit +
                               "user_id=" + LoginInfo.Instance().mylogindata.user_id +
                               "&unionuid=" + LoginInfo.Instance().mylogindata.token +
                               "&room_id=" + LoginInfo.Instance().mylogindata.room_id +
                               "&game_id=" + LoginInfo.Instance().mylogindata.choosegame
                           ));
        }
    }
コード例 #2
0
ファイル: NewXiaWeiYi.cs プロジェクト: wu18218732719/ZhongHua
    private void OnApplicationFocus(bool focus)
    {
        if (focus)
        {
            OnLogin onLo = new OnLogin("Login", LoginInfo.Instance().mylogindata.user_id, LoginInfo.Instance().mylogindata.room_id.ToString(), LoginInfo.Instance().mylogindata.choosegame.ToString());
            string  str  = JsonMapper.ToJson(onLo);

            tcp.SendMessage(str);
            StartCoroutine(GetHistory());
            StartCoroutine(OnReGet());
        }
    }