Esempio n. 1
0
    IEnumerator PlaySummon(Card card)
    {
        uiManager.SetLocationSelectionPrompt(true);
        DetectSummonableSpace();
        yield return(new WaitUntil(() => GetQueue().Count == 1));

        uiManager.SetLocationSelectionPrompt(false);
        Tile tile = GetQueue()[0];

        SetNeutral();
        summoner.Summon(tile);
        yield return(new WaitUntil(() => summoner.GetDone()));

        card.SummonAt(tile);
        tile.UpdateIndicatorPosition();
        yield return(StartCoroutine(player.LoseMana(card.GetManaCost())));

        ClearQueue();
        cardManager.AddToDiscard(card);
        Destroy(card.gameObject);
    }