Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        roulling = true;

        Player.GetComponent <Player>().enabled = false;
        Bouche.GetComponent <Plane>().enabled  = false;

        StartCoroutine("Player_Chose");
    }
Exemplo n.º 2
0
    IEnumerator Player_Chose()
    {
        Timer_total = Random.Range(2.5f, 4);
        yield return(new WaitForSeconds(Timer_total));

        roulling = false;
        if (pointer.transform.rotation.z > 180)
        {
            player_whoStart = 2;
        }
        else
        {
            player_whoStart = 1;
        }
        yield return(new WaitForSeconds(1));

        Player.GetComponent <Player>().enabled = true;
        Bouche.GetComponent <Plane>().enabled  = true;
        if (player_whoStart == 2)
        {
            GameObject.Find("JoyconManager").GetComponent <Main>().TriggerFreeze();
        }
    }