コード例 #1
0
    private IEnumerator TurnRandomizer()
    {
        yield return(new WaitForSeconds(0.5f));

        gameControl.UpdateBloodPoints();
        gameControl.UpdateMarkedPiece();
        gameControl.Staff();
        dialogueTrigger.MaryGreeting();
        dialogueTrigger.EnemyGreeting();

        for (int i = 0; i < Random.Range(8, 13); i++)
        {
            yield return(new WaitForSeconds(0.1f * i));

            if (gameControl.playerTurn == (int)Player_Turn.mary)
            {
                gameControl.playerTurn = (int)Player_Turn.enemy;
            }
            else if (gameControl.playerTurn == (int)Player_Turn.enemy)
            {
                gameControl.playerTurn = (int)Player_Turn.mary;
            }

            CardSpin(i);
        }

        yield return(new WaitForSeconds(1f));

        GameObject.Find("TurnCards").SetActive(false);

        gameControl.TurnStart();
        gameStart = true;
    }