Exemple #1
0
    void Start()
    {
        UpdateTime = 0;
        _card      = CardsGameObjects.OnlyDetachHandle();
        _card.AddComponent <CanBeDetached>();
        _card.AddComponent <CanBeMoved>();
        var owned = _card.AddComponent <CanBeOwned>();

        owned.PlayerOwned = true;

        _hand        = Hand.CreateHand(true);
        _canbeinhand = _card.AddComponent <CanBeInHand>();

        _canbeinhand.AddedToHand(0, 1, _hand);
        IntegrationTest.Assert(_canbeinhand.IsInHand == true);
    }
Exemple #2
0
 /// <summary>
 /// Adds a card into the hand.
 /// Does not update already present cards, use PrepareAddingCard for that.
 /// Will move and rotate the card to have a correct transform.
 /// </summary>
 /// <param name="card">Card to be added.</param>
 public void Add(CanBeInHand card)
 {
     card.AddedToHand(Cards.Count, Cards.Count + 1, this);
     Cards.Add(card);
 }