Beispiel #1
0
 public void Animate(CardQualities card)
 {
     animationTime        = AnimationLength;
     Animating            = true;
     currentAnimatingCard = Instantiate(CardPrefab, parent: transform);
     currentAnimatingCard.GetComponent <CardVisuals>().Initialize(card);
 }
Beispiel #2
0
    public void DrawCard(DrawPoolType pool)
    {
        int           key;
        CardQualities card = new CardQualities();

        switch (pool)
        {
        case DrawPoolType.random:
            key  = generateKey();
            card = new CardQualities(Suit.IntToSuit(Random.Range(1, 8)), Random.Range(1, GameProperties.TrickLength + 1));
            break;

        case DrawPoolType.PlayerOne:
            key  = randomKeyFromPool(Player.one);
            card = PlayerOneState.DrawPool[key];
            break;

        case DrawPoolType.PlayerTwo:
            key  = randomKeyFromPool(Player.two);
            card = PlayerOneState.DrawPool[key];
            break;
        }
        DrawAnimator.Singleton.Animate(card);
        CurrentPlayerState.Hand.Add(card);
    }
Beispiel #3
0
 public void Initialize(CardQualities quanta)
 {
     ((Text)placeholder).text = quanta.Rank + "\n" + quanta.Suit.root + "\n" + quanta.Suit.third + "\n" + quanta.Suit.fifth;
 }