Beispiel #1
0
    public void RevealAchievementById(string achievementId)
    {
        if (AndroidNativeSettings.Instance.Is_Achievements_Editor_Notifications_Enabled)
        {
            SA_EditorNotifications.ShowNotification(achievementId, "Reveal Method Called", SA_EditorNotificationType.Achievement);
        }

        if (!GooglePlayConnection.CheckState())
        {
            return;
        }
        AN_GMSGeneralProxy.revealAchievementById(achievementId);
    }
Beispiel #2
0
    public void IncrementAchievementById(string achievementId, int numsteps)
    {
        if (AndroidNativeSettings.Instance.Is_Achievements_Editor_Notifications_Enabled)
        {
            SA_EditorNotifications.ShowNotification(achievementId, "Incremented " + numsteps + " Steps", SA_EditorNotificationType.Achievement);
        }

        if (!GooglePlayConnection.CheckState())
        {
            return;
        }
        AN_GMSGeneralProxy.incrementAchievementById(achievementId, numsteps.ToString());
    }
Beispiel #3
0
    public void SubmitScoreById(string leaderboardId, long score)
    {
        if (AndroidNativeSettings.Instance.Is_Leaderboards_Editor_Notifications_Enabled)
        {
            SA_EditorNotifications.ShowNotification(leaderboardId, score + " Scores Submitted", SA_EditorNotificationType.Achievement);
        }

        if (!GooglePlayConnection.CheckState())
        {
            return;
        }
        AN_GMSGeneralProxy.submitScoreById(leaderboardId, score);
    }
Beispiel #4
0
    public void UnlockAchievement(string achievementName)
    {
        if (AndroidNativeSettings.Instance.Is_Achievements_Editor_Notifications_Enabled)
        {
            SA_EditorNotifications.ShowNotification(achievementName, "Unlock Method Called", SA_EditorNotificationType.Achievement);
        }

        if (!GooglePlayConnection.CheckState())
        {
            return;
        }
        AN_GMSGeneralProxy.reportAchievement(achievementName);
    }
Beispiel #5
0
    public void Connect()
    {
        if (AndroidNativeSettings.Instance.IsBase64KeyWasReplaced)
        {
            _IsConnectingToServiceInProcess = true;
            Connect(AndroidNativeSettings.Instance.base64EncodedPublicKey);
        }
        else
        {
            SA_EditorNotifications.ShowNotification("Billing Connection Failed", "Wrong Public Key", SA_EditorNotificationType.Error);

            BillingResult result = new BillingResult(BillingResponseCodes.BILLINGHELPER_MISSING_TOKEN, "Connection Failed");
            ActionBillingSetupFinished(result);
        }
    }
Beispiel #6
0
    private void GenerateConnectionResult()
    {
        bool IsSucceeded = SA_EditorTesting.HasFill(_RequestsSuccessRate);

        BillingResult result;

        if (IsSucceeded)
        {
            _IsConnected = true;
            result       = new BillingResult(BillingResponseCodes.BILLING_RESPONSE_RESULT_OK, "Connection Successful");
            SA_EditorNotifications.ShowNotification("Billing Connected", "Connection successful", SA_EditorNotificationType.Message);
        }
        else
        {
            result = new BillingResult(BillingResponseCodes.BILLINGHELPER_UNKNOWN_ERROR, "Connection Failed");
            SA_EditorNotifications.ShowNotification("Billing Connection Failed", "Connection Failed", SA_EditorNotificationType.Error);
        }

        _IsConnectingToServiceInProcess = false;
        ActionBillingSetupFinished(result);
    }
    public void Connect()
    {
        SA.Common.Util.General.Invoke(UnityEngine.Random.Range(0.5f, 3f), () => {
            bool IsSucceeded             = SA_EditorTesting.HasFill(_RequestsSuccessRate);
            UM_BillingConnectionResult r = new UM_BillingConnectionResult();


            if (IsSucceeded)
            {
                _IsConnected = true;
                r.isSuccess  = true;
                r.message    = "Editor Testing Service Connected";
                SA_EditorNotifications.ShowNotification("Billing Connected", "Connection successful", SA_EditorNotificationType.Message);
            }
            else
            {
                r.isSuccess = false;
                r.message   = "Connection failed";
                SA_EditorNotifications.ShowNotification("Billing Connection Failed", "Connection Failed", SA_EditorNotificationType.Error);
            }
            SendServiceConnectedEvent(r);
        });
    }
 public void Show_E_Notifications()
 {
     SA_EditorNotifications.ShowNotification("Error", "Test Notification Body", SA_EditorNotificationType.Error);
 }
 public void Show_L_Notifications()
 {
     SA_EditorNotifications.ShowNotification("Leaderboard", "Test Notification Body", SA_EditorNotificationType.Leaderboards);
 }
 public void Show_A_Notifications()
 {
     SA_EditorNotifications.ShowNotification("Achievement", "Test Notification Body", SA_EditorNotificationType.Achievement);
 }
 public void Show_Notifications()
 {
     SA_EditorNotifications.ShowNotification("Test", "Test Notification Body", SA_EditorNotificationType.Message);
 }