public void ShowLeaderBoard(string leaderboardName)
 {
     if (!GooglePlayConnection.CheckState())
     {
         return;
     }
     AN_GMSGeneralProxy.showLeaderBoard(leaderboardName);
 }
 public void ShowLeaderBoardsUI()
 {
     if (!GooglePlayConnection.CheckState())
     {
         return;
     }
     AN_GMSGeneralProxy.showLeaderBoardsUI();
 }
예제 #3
0
    //--------------------------------------
    // PUBLIC METHODS
    //--------------------------------------

    public void LoadEvents()
    {
        if (!GooglePlayConnection.CheckState())
        {
            return;
        }
        AN_GMSQuestsEventsProxy.loadEvents();
    }
예제 #4
0
 public void SumbitEvent(string eventId, int count)
 {
     if (!GooglePlayConnection.CheckState())
     {
         return;
     }
     AN_GMSQuestsEventsProxy.sumbitEvent(eventId, count);
 }
예제 #5
0
 public void AcceptQuest(string id)
 {
     if (!GooglePlayConnection.CheckState())
     {
         return;
     }
     AN_GMSQuestsEventsProxy.acceptQuest(id);
 }
예제 #6
0
    //--------------------------------------
    // PUBLIC API CALL METHODS
    //--------------------------------------

    public void ShowSavedGamesUI(string title, int maxNumberOfSavedGamesToShow)
    {
        if (!GooglePlayConnection.CheckState())
        {
            return;
        }

        AN_GMSGeneralProxy.ShowSavedGamesUI_Bridge(title, maxNumberOfSavedGamesToShow);
    }
    //--------------------------------------
    // PUBLIC API CALL METHODS
    //--------------------------------------

    public void ShowSavedGamesUI(string title, int maxNumberOfSavedGamesToShow, bool allowAddButton = true, bool allowDelete = true)
    {
        if (!GooglePlayConnection.CheckState())
        {
            return;
        }

        AN_GMSGeneralProxy.ShowSavedGamesUI_Bridge(title, maxNumberOfSavedGamesToShow, allowAddButton, allowDelete);
    }
예제 #8
0
    public void ShowRequestsAccepDialog()
    {
        if (!GooglePlayConnection.CheckState())
        {
            return;
        }

        AN_GMSGiftsProxy.showRequestAccepDialog();
    }
예제 #9
0
    public void clearDefaultAccount()
    {
        if (!GooglePlayConnection.CheckState())
        {
            return;
        }

        AN_GMSGeneralProxy.clearDefaultAccount();
        GooglePlayConnection.instance.disconnect();
    }
예제 #10
0
    //--------------------------------------
    // GIFTS
    //--------------------------------------

    public void SendGiftRequest(GPGameRequestType type, int requestLifetimeDays, Texture2D icon, string description, string playload = "")
    {
        if (!GooglePlayConnection.CheckState())
        {
            return;
        }

        byte[] val         = icon.EncodeToPNG();
        string bytesString = System.Convert.ToBase64String(val);

        AN_GMSGiftsProxy.sendGiftRequest((int)type, playload, requestLifetimeDays, bytesString, description);
    }
예제 #11
0
    public void UpdatePlayerScoreLocal(GPLeaderBoard leaderboard)
    {
        if (!GooglePlayConnection.CheckState())
        {
            return;
        }
        int requestId = SA_IdFactory.NextId;

        leaderboard.CreateScoreListener(requestId);

        AN_GMSGeneralProxy.loadLeaderboardInfoLocal(leaderboard.Id, requestId);
    }
예제 #12
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);
    }
예제 #13
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());
    }
예제 #14
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);
    }
예제 #15
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);
    }
예제 #16
0
    public void ResetLeaderBoard(string leaderboardId)
    {
        if (!GooglePlayConnection.CheckState())
        {
            return;
        }
        AN_GMSGeneralProxy.resetLeaderBoard(leaderboardId);

        if (leaderBoards.ContainsKey(leaderboardId))
        {
            leaderBoards.Remove(leaderboardId);
        }
    }
예제 #17
0
    public void DismissRequest(params string[] ids)
    {
        if (!GooglePlayConnection.CheckState())
        {
            return;
        }

        if (ids.Length == 0)
        {
            return;
        }


        AN_GMSGiftsProxy.dismissRequest(string.Join(AndroidNative.DATA_SPLITTER, ids));
    }
예제 #18
0
    public void ResetLeaderBoard(string leaderboardId)
    {
        if (!GooglePlayConnection.CheckState())
        {
            return;
        }
        AN_GMSGeneralProxy.resetLeaderBoard(leaderboardId);

        foreach (GPLeaderBoard lb in LeaderBoards)
        {
            if (lb.Id.Equals(leaderboardId))
            {
                LeaderBoards.Remove(lb);
                return;
            }
        }
    }
    public void LoadQuests(GP_QuestSortOrder sortOrder, params GP_QuestsSelect[] selectors)
    {
        if (!GooglePlayConnection.CheckState())
        {
            return;
        }

        string questSelectors = "";

        for (int i = 0; i < selectors.Length; i++)
        {
            int v = (int)selectors[i];
            questSelectors += v.ToString();
            questSelectors += ",";
        }

        questSelectors = questSelectors.TrimEnd(',');

        AN_GMSQuestsEventsProxy.loadQuests(questSelectors, (int)sortOrder);
    }
예제 #20
0
 public void F_ResetGame()
 {
     PlayerPrefs.SetFloat("MaxScore", m_maxScore);
     GooglePlayConnection.AddScoreToLeaderboard((long)m_maxScore);
     SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
 }
예제 #21
0
 public void ShowLeaderboard()
 {
     GooglePlayConnection.ShowLeaderboard();
 }