private void OnDestroy()
    {
#if !UNITY_EDITOR
        GooglePlayGameServicesWrapper.Instance().SignedInSucceeded -= this.OnSignInSucceeded;
        GooglePlayGameServicesWrapper.Instance().SignedInFailed    -= this.OnSignInFailed;
        GooglePlayGameServicesWrapper.Instance().SignedOut         -= this.OnSignedOut;
#endif
    }
    public void SignOut()
    {
#if UNITY_EDITOR
        this.SetActiveState();
#else
        GooglePlayGameServicesWrapper.Instance().SignOut();
        this.SetActiveState();
#endif
    }
    private void SetActiveState()
    {
#if UNITY_EDITOR
        this.gameObject.SetActive(false);
#else
        bool signedIn = GooglePlayGameServicesWrapper.Instance().IsSignedIn();
        this.gameObject.SetActive(signedIn != this.IsSignIn);
#endif
    }
    private void Awake()
    {
        this.clicked = false;

#if !UNITY_EDITOR
        GooglePlayGameServicesWrapper.Instance().SignedInSucceeded += this.OnSignInSucceeded;
        GooglePlayGameServicesWrapper.Instance().SignedInFailed    += this.OnSignInFailed;
        GooglePlayGameServicesWrapper.Instance().SignedOut         += this.OnSignedOut;
#endif
    }
    public void SignIn()
    {
#if UNITY_EDITOR
        this.SetActiveState();
#else
        GooglePlayGameServicesWrapper.Instance().SignedInSucceeded += this.OnSignInSucceeded;
        GooglePlayGameServicesWrapper.Instance().SignedInFailed    += this.OnSignInFailed;
        GooglePlayGameServicesWrapper.Instance().SignedOut         += this.OnSignedOut;
        GooglePlayGameServicesWrapper.Instance().SignIn();
#endif
    }
Esempio n. 6
0
    private void OnClick()
    {
#if !UNITY_EDITOR
        GooglePlayGameServicesWrapper.Instance().ShowAchievements();
#endif
    }
Esempio n. 7
0
    private void OnClick()
    {
#if !UNITY_EDITOR
        GooglePlayGameServicesWrapper.Instance().ShowAllLeaderBoards();
#endif
    }