Exemplo n.º 1
0
    private IEnumerator Init()
    {
        yield return(StartCoroutine(GameManager.instance.FadeOut(1f)));

        if (!PlayerPrefs.HasKey("gameCount"))
        {
            pause = true;
            RulesMenu rm = Instantiate(rulesMenuPrefab, boardUI.transform).GetComponent <RulesMenu>();
            rm.boardManager = this;
        }

        while (pause)
        {
            yield return(null);
        }
        yield return(new WaitForSeconds(0.1f));

        for (int i = 0; i < playerList.Count; i++)
        {
            StartCoroutine(playerList[i].MoveTo(playerPositions[i], 1, 2));
            StartCoroutine(playerList[i].ShowScore(1f));
        }
        StartCoroutine(boardUI.BackgroudFade(0, 1));
        yield return(new WaitForSeconds(1));

        yield return(StartCoroutine(InitTurn()));
    }