Exemple #1
0
    // TODO update this when apropriate
    IEnumerator Congratulations()
    {
        int   flashCycles = 12;
        float flashPause  = 0.666f;

        for (int n = 0; n < flashCycles; n++)
        {
            string congratulations = "Level One Complete! Congratulations!\n\nPlease " +
                                     ApplyColour.NextColour + "'stay tuned'" + ApplyColour.Close + " for future developments, thanks for playing!";
            ApplyColour.Toggle();
            text_tasklist.text = ApplyColour.Colour + congratulations + ApplyColour.Close;
            yield return(new WaitForSeconds(flashPause));
        }
    }
Exemple #2
0
    void PollMisc()
    {
        // Misc: C, H, M, [, ], Ctrl-E.
        if (Input.GetKeyDown(KeyCode.M))
        {
            musicPlayer.AlternateMusic();
        }
        if (Input.GetKeyDown(KeyCode.C))
        {
            player.CasualMode();
        }
        if (Input.GetKeyDown(KeyCode.H))
        {
            ApplyColour.Toggle();
        }
        if (Input.GetKey(KeyCode.LeftBracket))
        {
            musicPlayer.VolumeDown();
        }
        else if (Input.GetKey(KeyCode.RightBracket))
        {
            musicPlayer.VolumeUp();
        }
        if ((Input.GetKey(KeyCode.RightControl) ||
             Input.GetKey(KeyCode.LeftControl)) &&
            Input.GetKeyDown(KeyCode.E))
        {
            pilot_ID_Field.Toggle();
        }

        // Player: R.
        if (Input.GetKeyDown(KeyCode.R))
        {
            player.TriggerRestart();
        }

        //SumPause is Polling: Q & ESC keys.
        // TODO pull-in ESC & Q monitoring to this class [low priority].
    }