Ejemplo n.º 1
0
    public static void UnlockConditions()
    {
        best1 = PlayerPrefManagement.GetBestPhase(1);
        best2 = PlayerPrefManagement.GetBestPhase(2);
        best3 = PlayerPrefManagement.GetBestPhase(3);
        best4 = PlayerPrefManagement.GetBestPhase(4);

        Unlocked_2 = best1 < 180f && best1 != 0;

        Unlocked_3 = best1 < 170f && best1 != 0 &&
                     best2 < 330f && best2 != 0;

        Unlocked_4 = best1 < 160f && best1 != 0 &&
                     best2 < 315f && best2 != 0 &&
                     best3 < 420f && best3 != 0;

        Unlocked_5 = best1 < 150f && best1 != 0 &&
                     best2 < 300f && best2 != 0 &&
                     best3 < 400f && best3 != 0 &&
                     best4 < 480f && best4 != 0;

        bool[] Unlocked = { Unlocked_2, Unlocked_3, Unlocked_4, Unlocked_5 };

        for (int i = 0; i < Unlocked.Length; i++)
        {
            if (Unlocked [i])
            {
                PlayerPrefManagement.UnlockPhase(i + 2);
            }
        }
    }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     P1.text = StopWatch.Convert(PlayerPrefManagement.GetBestPhase(1));
     P2.text = StopWatch.Convert(PlayerPrefManagement.GetBestPhase(2));
     P3.text = StopWatch.Convert(PlayerPrefManagement.GetBestPhase(3));
     P4.text = StopWatch.Convert(PlayerPrefManagement.GetBestPhase(4));
     P5.text = StopWatch.Convert(PlayerPrefManagement.GetBestPhase(5));
 }
Ejemplo n.º 3
0
    void HandleFinalTime()
    {
        if (PlayerPrefManagement.GetBestPhase(phaseNum) == 0 ||
            PlayerPrefManagement.GetBestPhase(phaseNum) > rawTime)
        {
            PlayerPrefManagement.SetBestPhase(rawTime, phaseNum);
            bestTime = true;
        }

        if (bestTime)
        {
            recordText.text = "New Record!";
        }
        else
        {
            recordText.text = "";
        }
    }