Example #1
0
    IEnumerator GameLoop()
    {
        while (true)
        {
            playerPicker.Open();
            yield return(new WaitUntil(() => playerPicker.ready == true));

            couple = playerPicker.couple;

            challangePicker.Open();
            yield return(new WaitUntil(() => challangePicker.ready == true));

            challange = challangePicker.challange;
        }
    }
Example #2
0
    private void Update()
    {
        if (popupsOpen)
        {
            if (Input.GetMouseButtonDown(0))
            {
                player1.Spin();
                player2.Spin();
                wheelsSpun = true;
            }

            if (wheelsSpun && !ready && !player1.spinning && !player2.spinning)
            {
                couple     = new PlayerCouple(list.players[player1.GetCurrentSlice()], list.players[player2.GetCurrentSlice()]);
                ready      = true;
                popupsOpen = false;
            }
        }
    }