コード例 #1
0
ファイル: UserManager.cs プロジェクト: Hengle/DEMO
    /// <summary>
    /// 用户登录
    /// </summary>
    /// <param name="LoginUser"></param>
    /// <param name="finished"></param>
    public void Login(BmobGameObject LoginUser, OnLoginFinish finished)
    {
        BmobQuery query = new BmobQuery();

        query.WhereEqualTo("userid", LoginUser.userid).WhereEqualTo("password", LoginUser.password);

        bmobUnity.Find <BmobGameObject>(TABLE_NAME, query, (resp, exception) =>
        {
            if (exception != null)
            {
                Debug.Log("查询失败, 失败原因为: " + exception.Message);
                return;
            }

            List <BmobGameObject> list = resp.results;
            if (list.Count != 0)
            {
                finished(true);
            }
            else
            {
                finished(false);
            }
            foreach (var user in list)
            {
                Debug.Log("ID:" + user.userid);
            }
        });
    }
コード例 #2
0
 public void DisplayStartingGame()
 {
     popUpMessageText.SetText("Starting the game...");
     popUp.SetActive(true);
     popUpBtn.gameObject.SetActive(false);
     OnLoginFinish.Invoke();
 }