Пример #1
0
    private void GameWon()
    {
        bool gameWon = false;

        if (Players.Length < 2)
        {
            return;
        }
        else
        {
            foreach (Movements player in Players)
            {
                if (player.OnPosition)
                {
                    gameWon = true;
                }
                else
                {
                    gameWon = false;
                    return;
                }
            }
        }
        Win.SetActive(true);
        FireWorks1.SetActive(true);
        FireWorks2.SetActive(true);
        if (Ending)
        {
            Debug.Log("Won");
            Ending = false;
            ImageColor.GetComponent <Image>().sprite = Suggestions2;
            if (HorseShoe)
            {
                sv.CompleteHorseShoe(true);
            }
            if (DarumaLevel)
            {
                sv.CompleteDaruma(true);
            }
            if (CloverLevel)
            {
                sv.CompleteClover(true);
            }
            StartCoroutine(BackToMenu());
        }
    }