예제 #1
0
파일: GM.cs 프로젝트: ctjoa/Mastery
    public void RegisterCueSelect(GameObject frame)
    {
        // disable others
        if (frame.name != frame_1.name)
        {
            frame_1.SetActive(false);
        }
        if (frame.name != frame_2.name)
        {
            frame_2.SetActive(false);
        }
        if (frame.name != frame_3.name)
        {
            frame_3.SetActive(false);
        }
        if (frame.name != frame_4.name)
        {
            frame_4.SetActive(false);
        }

        // disable select cue text
        Select_Cue_Text.text = "How ANGRY does the cue make you feel?";

        // move selected cue to bottom center
        frame.gameObject.transform.position = new Vector3(0f, -1.5f, 0f);

        // guage
        guage.gameObject.SetActive(true);

        // increment curr game phase
        curr_game_phase = game_phase.FEELINGS;
    }
예제 #2
0
파일: GM.cs 프로젝트: alexjwade/Mastery
    public void Begin_Breath_Out()
    {
        // game phase
        curr_game_phase = game_phase.BREATH_OUT;

        // colors
        breath_cube_material.color = Color.blue;
        breath_light_game_object.gameObject.GetComponent <Light> ().color = Color.blue;

        // text
        Breath_Out_Text.gameObject.SetActive(true);
        Breath_In_Text.gameObject.SetActive(false);
    }
예제 #3
0
파일: GM.cs 프로젝트: ctjoa/Mastery
    public void StartGame()
    {
        curr_game_phase = game_phase.BREATH_OUT;

        Breath_Counter_Text.gameObject.SetActive(true);

        cubes.gameObject.SetActive(true);
        portal.gameObject.SetActive(true);
        wind.gameObject.SetActive(true);

        water.gameObject.GetComponent <AudioSource> ().Play();
        water_snap.TransitionTo(1f);
    }
예제 #4
0
파일: GM.cs 프로젝트: alexjwade/Mastery
 public void RegisterGuageClick()
 {
     if (feelings_counter++ == 0)
     {
         Select_Cue_Text.text = "How FEARFUL does the cue \n make your character feel?";
     }
     else
     {
         curr_game_phase = game_phase.FEELINGS;
         // move selected cue to better position
         selectedFrame.gameObject.transform.position = new Vector3(0.25f, 1.22f, 0f);
         StartCoroutine(FinishFeelings(0.1F));
     }
 }
예제 #5
0
파일: GM.cs 프로젝트: alexjwade/Mastery
    public void Begin_Breath_In()
    {
        // game phase
        curr_game_phase = game_phase.BREATH_IN;

        // colors
        breath_cube_material.color = Color.green;
        breath_light_game_object.gameObject.GetComponent <Light> ().color = Color.green;

        // text
        Breath_In_Text.gameObject.SetActive(true);
        Breath_Out_Text.gameObject.SetActive(false);

        // incr breath counter
        Breath_Counter_Text.text = "Breaths To Go: " + --breath_counter;

        if (breath_counter == 0)
        {
            RegisterGameWon();
        }
    }
예제 #6
0
파일: GM.cs 프로젝트: alexjwade/Mastery
 IEnumerator FinishFeelings(float waitTime)
 {
     Select_Cue_Grouper.SetActive(false);
     //guage.gameObject.SetActive(false);
     gauge2.gameObject.SetActive(false);
     if (first_time)
     {
         //Debug.Log ("first");
         ModalPanel modalPanel = ModalPanel.Instance();
         curr_game_phase = game_phase.FEELINGS;
         modalPanel.Start();
         while (curr_game_phase != game_phase.BREATH_OUT && curr_game_phase != game_phase.BREATH_IN)
         {
             yield return(new WaitForSeconds(waitTime));
         }
     }
     else
     {
         curr_game_phase = game_phase.BREATH_OUT;
     }
     StartGame();
 }