Exemple #1
0
    void OnCopyClick(GameObject g)
    {
        string idText = id.text;

        idText = idText.Substring(idText.LastIndexOf(":") + 1);
        GlobalData.CopyTextFromLab(idText.Trim());
    }
Exemple #2
0
    public void GetClipRoomCodeEnterRoom()
    {
        Debug.Log("返回到游戏--------");  //  返回游戏的时候触发     执行顺序 2
        var text = "";

#if UNITY_IPHONE && !UNITY_EDITOR
        text = _getClipboardText();
#elif UNITY_ANDROID && !UNITY_EDITOR
        var javaClass = new AndroidJavaObject(GlobalData.mGamePackageName + ".CSharpToJava");
        text = javaClass.Call <string>("getClipboardText");
#endif

        if (text != null && text != "")
        {
            Debug.Log(text);
            string[] texts = text.Split('*');
            if (texts.Length >= 3)
            {
                string roomCode   = texts[1];
                bool   isHomeView = GameManager.Instance.mCurGameStatus == EGameStatus.EHome && !ContextManager.Instance.IsContains(UIType.WaitGameView.Name);
                if (isHomeView)
                {
                    Debug.Log("当前处主界面");
                    SDKManager.Instance.ReAnotherRequest(roomCode);
                    GlobalData.CopyTextFromLab("");
                }
            }
        }
    }
Exemple #3
0
    void OnCopyRoomCodeClick(GameObject g)
    {
        string roomCode  = string.Format("房间号: *{0}*\n", RoomInfo.Instance.mRoomCode.ToString());
        string type      = "玩法:" + RoomInfo.Instance.GetgameTypeString() + "\n";
        string curCount  = "当前人数:" + (RoomInfo.Instance.GetRealPlayerCount() + 1) + "\n";
        string finalInfo = roomCode + type + curCount;
        string tip       = "(复制信息打开app自动进入房间)";

        finalInfo += tip;
        Debug.Log("房间信息:" + finalInfo);
        GlobalData.CopyTextFromLab(finalInfo);
        SDKManager.Instance.openWechat();
    }
Exemple #4
0
 void OnCopyClcik(GameObject g)
 {
     AudioManager.Instance.PlayClickBtnAudio();
     curLab = g == copyBtn1.gameObject ? zhaoShangLab : keFuLab;
     GlobalData.CopyTextFromLab(curLab.text.Trim());
 }
Exemple #5
0
 void OnCopyClcik(GameObject g)
 {
     GlobalData.CopyTextFromLab(serviceLab.text.Trim());
 }