Пример #1
0
    // adds streak and determines current multiplier value
    private void AddStreak()
    {
        streak++;

        if (multiplier <= 4)
        {
            if (streak >= 24)
            {
                multiplier = 4;
            }
            else if (streak >= 16)
            {
                multiplier = 3;
            }
            else if (streak >= 8)
            {
                multiplier = 2;
            }
            else
            {
                multiplier = 1;
            }
        }
        else if (streak < 8)
        {
            multiplier = 1;
        }

        if (streak > GameData.currentSongStats.longestStreak)
        {
            GameData.currentSongStats.longestStreak = streak;
        }

        streakText.SendMessage("Pulse");
    }
Пример #2
0
    private void ChangeAccuracyText(ScoreHandler.HitAccuracy hitAccuracy)
    {
        switch (hitAccuracy)
        {
        case ScoreHandler.HitAccuracy.Perfect:
            accuracyText.text = "PERFECT";
            break;

        case ScoreHandler.HitAccuracy.Great:
            accuracyText.text = "GREAT";
            break;

        case ScoreHandler.HitAccuracy.Good:
            accuracyText.text = "GOOD";
            break;

        case ScoreHandler.HitAccuracy.Miss:
            accuracyText.text = "MISS";
            break;
        }

        accuracyText.SendMessage("Pulse");
    }
Пример #3
0
 // Update is called once per frame
 void Update()
 {
     if (GameManager.gameScene == 11)
     {
         if (phase == 0)
         {
             one.gameObject.SetActive(true);
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 0 && one.GetComponent <ScrollText>().isTyping)
         {
             one.GetComponent <ScrollText>().cancelTyping = true;
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 0 && !one.GetComponent <ScrollText>().isTyping)
         {
             phase = 1;
         }
         if (phase == 1)
         {
             two.gameObject.SetActive(true);
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 1 && two.GetComponent <ScrollText>().isTyping)
         {
             two.GetComponent <ScrollText>().cancelTyping = true;
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 1 && !two.GetComponent <ScrollText>().isTyping)
         {
             phase = 2;
         }
         if (phase == 2)
         {
             three.gameObject.SetActive(true);
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 2 && three.GetComponent <ScrollText>().isTyping)
         {
             three.GetComponent <ScrollText>().cancelTyping = true;
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 2 && !three.GetComponent <ScrollText>().isTyping)
         {
             phase = 3;
         }
         if (phase == 3)
         {
             one.gameObject.SetActive(false);
             two.gameObject.SetActive(false);
             three.gameObject.SetActive(false);
             four.gameObject.SetActive(true);
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 3 && four.GetComponent <ScrollText>().isTyping)
         {
             four.GetComponent <ScrollText>().cancelTyping = true;
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 4 && !five.GetComponent <SizePop>().displayed)
         {
             five.SendMessage("Stop");
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 3 && !four.GetComponent <ScrollText>().isTyping)
         {
             phase = 4;
         }
         if (phase == 4)
         {
             five.gameObject.SetActive(true);
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 4 && five.GetComponent <SizePop>().displayed)
         {
             phase = 5;
         }
         if (phase == 5)
         {
             six.gameObject.SetActive(true);
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 5 && six.GetComponent <ScrollText>().isTyping)
         {
             six.GetComponent <ScrollText>().cancelTyping = true;
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 5 && !six.GetComponent <ScrollText>().isTyping)
         {
             GameManager.gameScene = 14;
             SceneManager.LoadScene("Scene8");
         }
     }
     else if (GameManager.gameScene == 12)
     {
         if (phase == 0)
         {
             seven.gameObject.SetActive(true);
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 0 && seven.GetComponent <ScrollText>().isTyping)
         {
             seven.GetComponent <ScrollText>().cancelTyping = true;
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 0 && !seven.GetComponent <ScrollText>().isTyping)
         {
             phase = 1;
         }
         if (phase == 1)
         {
             eight.gameObject.SetActive(true);
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 1 && eight.GetComponent <ScrollText>().isTyping)
         {
             eight.GetComponent <ScrollText>().cancelTyping = true;
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 1 && !eight.GetComponent <ScrollText>().isTyping)
         {
             GameManager.fuckYou2 = true;
             fuckCoroutine        = StartCoroutine(WaitforFuck());
             phase = 2;
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 3 && (nine.gameObject.activeSelf || ten.gameObject.activeSelf))
         {
             Stop();
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 3)
         {
             phase = 4;
         }
         if (phase == 4)
         {
             seven.gameObject.SetActive(false);
             eight.gameObject.SetActive(false);
             nine.gameObject.SetActive(false);
             ten.gameObject.SetActive(false);
             eleven.gameObject.SetActive(true);
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 4 && eleven.GetComponent <ScrollText>().isTyping)
         {
             eleven.GetComponent <ScrollText>().cancelTyping = true;
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 4 && !eleven.GetComponent <ScrollText>().isTyping)
         {
             GameManager.gameScene = 14;
             SceneManager.LoadScene("Scene8");
         }
     }
     else if (GameManager.gameScene == 13)
     {
         if (phase == 0)
         {
             twelve.gameObject.SetActive(true);
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 0 && twelve.GetComponent <ScrollText>().isTyping)
         {
             twelve.GetComponent <ScrollText>().cancelTyping = true;
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 0 && !twelve.GetComponent <ScrollText>().isTyping)
         {
             phase = 1;
         }
         if (phase == 1)
         {
             two.gameObject.SetActive(true);
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 1 && two.GetComponent <ScrollText>().isTyping)
         {
             two.GetComponent <ScrollText>().cancelTyping = true;
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 1 && !two.GetComponent <ScrollText>().isTyping)
         {
             phase = 2;
         }
         if (phase == 2)
         {
             three.gameObject.SetActive(true);
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 2 && three.GetComponent <ScrollText>().isTyping)
         {
             three.GetComponent <ScrollText>().cancelTyping = true;
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 2 && !three.GetComponent <ScrollText>().isTyping)
         {
             phase = 3;
         }
         if (phase == 3)
         {
             twelve.gameObject.SetActive(false);
             two.gameObject.SetActive(false);
             three.gameObject.SetActive(false);
             four.gameObject.SetActive(true);
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 3 && four.GetComponent <ScrollText>().isTyping)
         {
             four.GetComponent <ScrollText>().cancelTyping = true;
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 4 && !five.GetComponent <SizePop>().displayed)
         {
             five.SendMessage("Stop");
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 3 && !four.GetComponent <ScrollText>().isTyping)
         {
             phase = 4;
         }
         if (phase == 4)
         {
             five.gameObject.SetActive(true);
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 4 && five.GetComponent <SizePop>().displayed)
         {
             phase = 5;
         }
         if (phase == 5)
         {
             six.gameObject.SetActive(true);
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 5 && six.GetComponent <ScrollText>().isTyping)
         {
             six.GetComponent <ScrollText>().cancelTyping = true;
         }
         if (Input.GetKeyDown(KeyCode.Space) && phase == 5 && !six.GetComponent <ScrollText>().isTyping)
         {
             GameManager.gameScene = 14;
             SceneManager.LoadScene("Scene8");
         }
     }
 }
Пример #4
0
    // Update is called once per frame
    void Update()
    {
        if (phase == 0)
        {
            one.gameObject.SetActive(true);
        }
        if (Input.GetKeyDown(KeyCode.Space) && phase == 0 && one.GetComponent <ScrollText>().isTyping)
        {
            one.GetComponent <ScrollText>().cancelTyping = true;
        }
        if (Input.GetKeyDown(KeyCode.Space) && phase == 0 && !one.GetComponent <ScrollText>().isTyping)
        {
            GameManager.fadeFootsteps = true;
            phase = 1;
        }
        if (phase == 1)
        {
            two.gameObject.SetActive(true);
        }
        if (Input.GetKeyDown(KeyCode.Space) && phase == 1 && two.GetComponent <ScrollText>().isTyping)
        {
            two.GetComponent <ScrollText>().cancelTyping = true;
        }
        if (phase == 1 && two.GetComponent <ScrollText>().displayed)
        {
            assistTimer += Time.deltaTime;
            if (assistTimer > 0.5f)
            {
                three.gameObject.SetActive(true);
                assistTimer = 0.0f;
            }
        }
        if (phase == 1 && three.GetComponent <FadeInText>().displayed&& Input.GetKeyDown(KeyCode.Space))
        {
            phase = 2;
        }
        if (phase == 2)
        {
            one.gameObject.SetActive(false);
            two.gameObject.SetActive(false);
            three.gameObject.SetActive(false);
            four.gameObject.SetActive(true);
        }
        if (phase == 2 && four.GetComponent <SlamBehavior>().landed&& Input.GetKeyDown(KeyCode.Space))
        {
            phase = 3;
        }
        if (phase == 3)
        {
            five.gameObject.SetActive(true);
        }
        if (Input.GetKeyDown(KeyCode.Space) && phase == 3 && five.GetComponent <ScrollText>().isTyping)
        {
            five.GetComponent <ScrollText>().cancelTyping = true;
        }
        if (phase == 4)
        {
            GameManager.stopMusic = true;
            six.gameObject.SetActive(true);
            phase = 5;
        }
        if (Input.GetKeyDown(KeyCode.Space) && phase == 3 && !five.GetComponent <ScrollText>().isTyping)
        {
            phase = 4;
        }

        if (phase == 7 && Input.GetKeyDown(KeyCode.Space))
        {
            GameManager.scream = true;
            StartCoroutine(RedRaveParty());
            phase = 8;
        }

        if (phase == 6 && Input.GetKeyDown(KeyCode.Space))
        {
            seven.SendMessage("Shake");
            phase = 7;
        }

        if (phase == 5 && Input.GetKeyDown(KeyCode.Space))
        {
            four.gameObject.SetActive(false);
            five.gameObject.SetActive(false);
            six.gameObject.SetActive(false);
            seven.gameObject.SetActive(true);
            phase = 6;
        }

        if (raved && phase == 8)
        {
            GameManager.playSecondSong = true;
            seven.gameObject.SetActive(false);
            eight.gameObject.SetActive(true);
            phase = 9;
        }
        if (Input.GetKeyDown(KeyCode.Space) && phase == 9 && eight.GetComponent <ScrollText>().isTyping)
        {
            eight.GetComponent <ScrollText>().cancelTyping = true;
        }
        if (Input.GetKeyDown(KeyCode.Space) && phase == 9 && !eight.GetComponent <ScrollText>().isTyping)
        {
            phase = 10;
        }
        if (phase == 10)
        {
            nine.gameObject.SetActive(true);
            stopper.gameObject.SetActive(false);
        }
        if (Input.GetKeyDown(KeyCode.Space) && phase == 10 && nine.GetComponent <ScrollText>().isTyping)
        {
            nine.GetComponent <ScrollText>().cancelTyping = true;
        }
        if (Input.GetKeyDown(KeyCode.Space) && phase == 10 && !nine.GetComponent <ScrollText>().isTyping)
        {
            phase = 11;
        }
        if (phase == 11)
        {
            cursor.SetActive(true);
            goodResponse.SetActive(true);
            badRepsonse.SetActive(true);
            StartCoroutine(RunTimer());
            phase        = 12;
            decisionTime = true;
        }
        if (phase == 12 && decisionTime)
        {
            if (Input.GetKey(KeyCode.Space) && goodResponse.GetComponent <ChoiceBehavior>().selectedBool)
            {
                timer.gameObject.SetActive(false);
                eight.gameObject.SetActive(false);
                nine.gameObject.SetActive(false);
                StopCoroutine(RunTimer());
                GameManager.fourthChoice = 1;
                goodResponse.SetActive(false);
                badRepsonse.SetActive(false);
                cursor.SetActive(false);
                decisionTime = false;
                phase        = 13;
            }
            if (Input.GetKey(KeyCode.Space) && badRepsonse.GetComponent <ChoiceBehavior>().selectedBool)
            {
                timer.gameObject.SetActive(false);
                eight.gameObject.SetActive(false);
                nine.gameObject.SetActive(false);
                StopCoroutine(RunTimer());
                GameManager.fourthChoice = 2;
                goodResponse.SetActive(false);
                badRepsonse.SetActive(false);
                cursor.SetActive(false);
                decisionTime = false;
                phase        = 13;
            }
        }
        if (phase == 13)
        {
            SceneManager.LoadScene("Scene9");
        }
    }