Esempio n. 1
0
    void Update()
    {
        HandleObstacles();
        HandlePowerups();

        EnsureDemoMode();
        if (wasDemoMode && !isDemoMode) TurnOffDemo();

        if ((redStreak == 3) || (blueStreak == 3))
        {
            //audio.scoreStreak();
            audio.EventOccurred(AudioPlaying.AnnouncementType.SCORESTREAK, AudioPlaying.AudioPriority.HIGH, 2f);
            redStreak = 0;
            blueStreak = 0;
        }

        if (Mathf.Abs(scoreBlue - scoreRed) == 3 && !saidItAlready)
        {
            //audio.largeScore();
            audio.EventOccurred(AudioPlaying.AnnouncementType.LARGESCORE, AudioPlaying.AudioPriority.HIGH, 2f);
            saidItAlready = true;
        }
    }
Esempio n. 2
0
    //-----------------------------------------
    // enteringInput
    // Is called when OnEndEdit is done in unity.
    // Created:     Colin Maguire 2017-02-07
    // Edited:      Colin Maguire 2017-02-07
    // Created class and did inital coding.
    public void enteringInput(Text input)
    {
        //Checks to see if anything has been inputed, if not returns.
        if (input.text != "")
        {
            //Checks to see if the command is true or not, if it is, adds the command to the messagebox for cheat, if not, it adds command not recoginzed to the messagebox.
            //cheatOutput.text += checkCommand(input.text.ToLower());
            string chk = checkCommand(input.text.ToLower());
            if (chk != "Command not recoginzed.")
            {
                //audio.cheat();
                audio.EventOccurred(AudioPlaying.AnnouncementType.CHEAT, AudioPlaying.AudioPriority.HIGH, 1f);
            }
            cheatOutput.text += chk;

            cheatOutput.text += "\n";

            Debug.Log(input.text.ToLower());
        }
        cheatInput.Select();
    }