Esempio n. 1
0
    IEnumerator DeepBreathingProcess()
    {
        string message1 = "Take deep breaths. Follow along with the circle";

        HUD.startHUDMessage(message1, 6f);
        //Spawn focus high above original menu and in distant view of player
        Instantiate(focus);
        Instantiate(BackGround);
        focus.transform.position         = new Vector3(100, 5000, 150);
        BackGround.transform.position    = new Vector3(200, 5000, 300);
        BackGround.transform.localScale += new Vector3(BackGround.transform.localScale[0] * 3, BackGround.transform.localScale[1] * 3, BackGround.transform.localScale[2] * 3);
        //teleports player far above menu area
        gameObject.transform.position = new Vector3(0, 5000, 0);
        //originalScale = focus.transform.localScale;
        //doubleScale = new Vector3(focus.transform.localScale[0] * 2, focus.transform.localScale[1] * 2, focus.transform.localScale[2] * 2);
        yield return(new WaitForSeconds(10.5f));

        string message2 = "Breathe from the belly";

        HUD.startHUDMessage(message2, 4f);
        //wait for exercise to end
        yield return(new WaitForSeconds(120));

        //destroy focus object and return player to menu
        //Destroy(focus);
        //Destroy(BackGround);
        BackGround.transform.localScale += new Vector3(BackGround.transform.localScale[0] / 4, BackGround.transform.localScale[1] / 4, BackGround.transform.localScale[2] / 4);
        gameObject.transform.position    = new Vector3(0, -15.21f, -18.88f);
    }
Esempio n. 2
0
    IEnumerator FocusProcess()
    {
        string message1 = "“If your eyeballs move, this means that you’re thinking, or about to start thinking. If you don’t want to be thinking at this particular moment, try to keep your eyeballs still.” –Lydia Davis";

        HUD.startHUDMessage(message1, 10f);
        //Spawn focus high above original menu and in distant view of player
        Instantiate(focus);
        focus.transform.position = new Vector3(-750, 5000, 500);
        //teleports player far above menu area
        gameObject.transform.position = new Vector3(0, 5000, 0);
        yield return(new WaitForSeconds(10.5f));

        string message2 = "Look at the dot for one minute";

        HUD.startHUDMessage(message2, 4f);
        //wait for exercise to end
        yield return(new WaitForSeconds(60));

        //destroy focus object and return player to menu
        //Destroy(focus);
        gameObject.transform.position = new Vector3(0, -15.21f, -18.88f);
    }