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 static GooglePlayGameServicesWrapper Instance()
    {
        if (mInstance != null)
            return mInstance;

        GameObject owner = new GameObject(INSTANCE_NAME);
        mInstance = owner.AddComponent<GooglePlayGameServicesWrapper>();
        DontDestroyOnLoad(mInstance);
        mInstance.AchievementData = string.Empty;
        return mInstance;
    }
    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
    }
Ejemplo n.º 7
0
    public static GooglePlayGameServicesWrapper Instance()
    {
        if (mInstance != null)
        {
            return(mInstance);
        }

        GameObject owner = new GameObject(INSTANCE_NAME);

        mInstance = owner.AddComponent <GooglePlayGameServicesWrapper>();
        DontDestroyOnLoad(mInstance);
        mInstance.AchievementData = string.Empty;
        return(mInstance);
    }
Ejemplo n.º 8
0
    private void OnClick()
    {
#if !UNITY_EDITOR
        GooglePlayGameServicesWrapper.Instance().ShowAchievements();
#endif
    }
Ejemplo n.º 9
0
    private void OnClick()
    {
#if !UNITY_EDITOR
        GooglePlayGameServicesWrapper.Instance().ShowAllLeaderBoards();
#endif
    }