コード例 #1
0
    public void CheckBlocks()
    {
        if (_blockCount < 1)
        {
            if (firstShot)
            {
                score += 5 * PlayerPrefs.GetInt("Level");
            }
            else
            {
                score += 3 * PlayerPrefs.GetInt("Level");
            }
            if (ballsCount >= PlayerPrefs.GetInt("BallsCount", 5))
            {
                PlayerPrefs.SetInt("BallsCount", ballsCount);
            }

            PlayerPrefs.SetInt("Level", PlayerPrefs.GetInt("Level") + 1);
            foreach (var ball in Shoot.GetBalls())
            {
                Destroy(ball);
            }
            SpawnLevel();
        }
    }