Exemple #1
0
 public void OnQuitButton()
 {
     if (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android)
     {
         //
         SkillzCrossPlatform.ReportFinalScore(Random.Range(1, 53021));
     }
     else
     {
         SceneManager.LoadScene("StartScene");
     }
 }
 public void LeaveGame(int finalScore)
 {
     if (HomeLogic.isUsingSkillz)
     {
         if (SkillzCrossPlatform.IsMatchInProgress())
         {
             SkillzCrossPlatform.ReportFinalScore(finalScore);
         }
     }
     else
     {
         SceneManager.LoadScene("HomeScene");
     }
 }
    void LateUpdate()
    {
        if (didSubmit)
        {
            return;
        }
        didSubmit = true;

        client.Reset();

        if (UserData.Instance != null)
        {
            UserData.Instance.IsGameOver       = false;
            UserData.Instance.IsGameStarted    = false;
            UserData.Instance.IsUnityAppPaused = false;
        }
        Debug.Log("Submitting score: " + client.Score);
        SkillzCrossPlatform.ReportFinalScore(client.Score);
    }
    public void gameOverActivate()
    {
        gameOver = true;

        gameOverScoreText.text = "YOUR SCORE" + "\r\n" + uiScore;
        gameOverComboText.text = "YOUR COMBO" + "\r\n" + combos;
        gameOverScoreText.gameObject.SetActive(true);
        gameOverComboText.gameObject.SetActive(true);

        if (PlayerPrefs.GetInt("HighScore") < uiScore)
        {
            PlayerPrefs.SetInt("HighScore", uiScore);
        }

        if (SkillzCrossPlatform.IsMatchInProgress())
        {
            SkillzCrossPlatform.ReportFinalScore(uiScore);
        }
    }
Exemple #5
0
    private IEnumerator ReportFinalScore(int finalScore)
    {
        yield return(new WaitForSeconds(3));

        SkillzCrossPlatform.ReportFinalScore(finalScore);
    }