예제 #1
0
    /// <summary>
    /// Event Handler for IPlayerHitBottom
    /// </summary>
    /// <param name="obj">Object Argument does not contain anyvalue only used as identifier</param>
    private void BallHitGround(Events.IBallHitBottom obj)
    {
        SaveManager.savaData.StorePoints += score;
        SaveManager.Save();

        if (score != 0)
        {
            if (SaveManager.CheckNewScore(score))
            {
                OpenScoreSubmitScreen();

                lastScoreWasHighScore = true;
                gamePaused            = true;
                waitForSubmit         = true;
            }
            else
            {
                lastScoreWasHighScore = false;
                ResetGame();
                gamePaused = false;
            }
        }
        else
        {
            if (score == 0)
            {
                lastScoreWasHighScore = false;
            }

            ResetGame();

            gamePaused = false;
        }
    }
예제 #2
0
 void onBallhitGround(Events.IBallHitBottom obj)
 {
     if (SaveManager.CheckNewScore(GameManager.Score))
     {
         StartCoroutine(playGameOver());
     }
 }