Пример #1
0
 public MulliganCard ToMulliganCard(MulliganRow mulliganRow)
 {
     return(MulliganCard.CreateCard(
                mulliganRow,
                id,
                ParseCombatTypes(this.combatTypes),
                ParseCardAttributes(this.attributes),
                basePower,
                faction));
 }
Пример #2
0
    private IEnumerator <System.Object> StartMulliganScene(MulliganResponse hand)
    {
        SceneManager.LoadScene("Mulligan");
        // After a LoadScene, we must wait one frame before calling FindObjectsOfType
        yield return(null);

        mulliganRow        = (MulliganRow)FindObjectOfType(typeof(MulliganRow));
        whoGoesFirstScreen = (WhoGoesFirstScreen)FindObjectOfType(typeof(WhoGoesFirstScreen));
        mulliganCountText  = (MulliganCountText)FindObjectOfType(typeof(MulliganCountText));
        mulliganRow.Populate(hand.cards.Select(c => c.ToMulliganCard(mulliganRow)));
    }
Пример #3
0
    public static MulliganCard CreateCard(
        MulliganRow mulliganRow,
        String id,
        IList <CombatType> combatTypes,
        IList <CardAttribute> attributes,
        int?basePower,
        String faction)
    {
        GameObject   cardObject = Instantiate((GameObject)Resources.Load("MulliganCard"), mulliganRow.transform);
        MulliganCard card       = cardObject.GetComponent <MulliganCard>();

        card.cardObject  = cardObject;
        card.id          = id;
        card.combatTypes = new List <CombatType>(combatTypes);
        card.attributes  = new List <CardAttribute>(attributes);
        card.basePower   = basePower;
        card.faction     = faction;
        card.image       = Resources.Load <Sprite>("CardImages/" + id);
        return(card);
    }
Пример #4
0
 public IList <MulliganCard> ToMulliganCards(MulliganRow mulliganRow)
 {
     return(this.cards.Select(dCard =>
                              dCard.ToMulliganCard(mulliganRow)
                              ).ToList());
 }