Exemplo n.º 1
0
    void AuthenticateCallback(bool success, string error)
    {
        gameObject.SetActive(false);

        if (success)
        {
            GooglePlayGameServiceManager.LoadFromCloud(this, "EnterButton");
            Debug.Log("USERNAME : "******"Not implemented on this platform")
        {
            Repository.sData["Nickname"] = "TEST";
            Repository.sData["Record"]   = "32";
            Repository.fLoading          = true;
        }
        else
        {
            Debug.Log("오류 : " + error);
            gameObject.SetActive(true);
            ShowAlert(error);
            return;
        }

        ShowAlert("");
        enterButton.SetActive(true);
    }
Exemplo n.º 2
0
    private void Awake()
    {
        DontDestroyOnLoad(bgm);
        DontDestroyOnLoad(se);

        GooglePlayGameServiceManager.Init();
    }
Exemplo n.º 3
0
    public static void UpdateData(string key, string value)
    {
        string tmp = "";

        sData[key] = value;
        foreach (KeyValuePair <string, string> target in sData)
        {
            tmp += target.Key + ',' + target.Value + '\n';
        }

        GooglePlayGameServiceManager.SaveToCloud(tmp);
    }
Exemplo n.º 4
0
    public void Login()
    {
        se.GetComponent <AudioSource>().clip = buttonSe;
        se.GetComponent <AudioSource>().Play();

        Social.localUser.Authenticate((bool success) =>
        {
            if (success)
            {
                GooglePlayGameServiceManager.LoadFromCloud(this, "EnterButton");
                Debug.Log("USERNAME : "******"");
                gameObject.SetActive(false);
                enterButton.SetActive(true);
            }
            else
            {
                ShowAlert("로그인에 실패했습니다");
            }
        });
    }
Exemplo n.º 5
0
    public void ToLobby(Text nickname)
    {
        se.GetComponent <AudioSource>().clip = buttonSe;
        se.GetComponent <AudioSource>().Play();

        if (nickname.text == "")
        {
            ShowAlert("닉네임을 입력해주세요");
        }
        else if (nickname.text.Length > 6)
        {
            ShowAlert("6글자 이내로 입력해주세요");
        }
        else if (Social.localUser.authenticated)
        {
            GooglePlayGameServiceManager.SaveToCloud("Nickname," + nickname.text);
            GooglePlayGameServiceManager.LoadFromCloud(this, "EnterButton");
            Debug.Log(Repository.sData["Nickname"]);
            SceneManager.LoadScene("LobbyScene");
        }
    }