Exemplo n.º 1
0
    public void onInvite(string query)
    {
        Debug.Log("onInvite: " + query);

        if (query.Length == 0)
        {
            return;
        }

        Dictionary <string, string> ps = PUtils.parseQuery(query);

        string scene = SceneManager.GetActiveScene().name;

        if (scene == "02.lobby")
        {
            GameObject ob = GameObject.Find("UI Root");

            if (ob != null)
            {
                Lobby lb = ob.GetComponent <Lobby> ();

                if (lb != null)
                {
                    lb.checkQuery();
                }
            }
        }
        else if (scene == "04.table3d")
        {
            ClearQuery();
        }
    }
Exemplo n.º 2
0
    public bool checkQuery()
    {
        AnysdkMgr am    = AnysdkMgr.GetInstance();
        string    query = am.GetQuery();

        if (query == null || query.Length == 0)
        {
            return(false);
        }

        Dictionary <string, string> ps = PUtils.parseQuery(query);

        string roomid = "";
        int    clubid = 0;
        int    gameid = 0;

        PUtils.setTimeout(() => {
            am.ClearQuery();
        }, 0.1f);

        if (ps.ContainsKey("room"))
        {
            roomid = ps["room"];
        }

        if (ps.ContainsKey("club"))
        {
            clubid = int.Parse(ps["club"]);
        }

        if (ps.ContainsKey("game"))
        {
            gameid = int.Parse(ps["game"]);
        }

        if (roomid != "")
        {
            enterRoom(roomid);
        }
        else if (clubid > 0)
        {
            enterClub(clubid);
        }
        else if (gameid > 0)
        {
            enterGame(gameid);
        }

        return(true);
    }
Exemplo n.º 3
0
        static int _m_parseQuery_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    string _query = LuaAPI.lua_tostring(L, 1);

                    System.Collections.Generic.Dictionary <string, string> gen_ret = PUtils.parseQuery(_query);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }