예제 #1
0
    // Update is called once per frame
    void Update()
    {
        if (!(charas[0].life || charas[1].life || charas[2].life))
        {
            SceneManager.LoadScene("GameOver");
        }
        if (!(enemies[0].life || enemies[1].life || enemies[2].life))
        {
            SceneManager.LoadScene("Clea");
        }
        if (control_turn.getTurn() == 2)
        {
            atkEn();
        }
        else if (control_turn.getTurn() == 1)
        {
            count++;
            if (count == 20)
            {
                count = 0;
            }
            for (int i = 0; i < 3; i++)
            {
                if (charas[i].atk_flag)
                {
                    atkMe(chara_ob[i], charas[i]);
                }
                if (charas[i].idou && charas[i].life)
                {
                    moveMe(chara_ob[i], charas[i]);
                }
            }

            /*if (!(charas[0].idou || charas[0].atk_flag || charas[1].idou || charas[1].atk_flag || charas[2].idou || charas[2].atk_flag)){
             * control_turn.changeTurn();
             * }*/
            if (!(charas[0].idou || charas[0].atk_flag) || !charas[0].life)
            {
                if (!(charas[1].idou || charas[1].atk_flag) || !charas[1].life)
                {
                    if (!(charas[2].idou || charas[2].atk_flag) || !charas[2].life)
                    {
                        control_turn.changeTurn();
                    }
                }
            }
        }
        else if (control_turn.getTurn() == 0)
        {
            control_bar.setTime(1 - (float)count_turn / (float)time_all, time_all - count_turn);
            if (count_turn == time_all)
            {
                count_turn = 0;
                control_turn.changeTurn();
            }
        }
    }
예제 #2
0
 // Update is called once per frame
 void Update()
 {
     //field_ob[1,1].transform.Translate(0,0.1f,0);
     if (control_turn.getTurn() == 0)
     {
         check_change();
         check_role();
         flag_check();
     }
 }
예제 #3
0
 void OnMouseDown()
 {
     control_turn.changeTurn();
     Debug.Log(control_turn.getTurn());
 }