Beispiel #1
0
        // Could be an attribute.
        public void SetHand(CardHand hand)
        {
            Debug.Log("Hand is now " + hand + " for " + this + "!");

            this.rb = this.GetComponent <Rigidbody>();

            this.hand           = hand;
            this.rb.isKinematic = (hand != null);
        }
Beispiel #2
0
        public void Discard()
        {
            this.hand.RemoveCard(this);
            this.hand = null;

            // Go to the dealer.
            LerpTo lt = this.GetComponent <LerpTo>();

            lt.Run(this.dealer.transform, true);

            // Disable colliders.
            Collider[] cols = this.GetComponents <Collider>();
            foreach (Collider col in cols)
            {
                col.enabled = false;
            }

            this.StartCoroutine(this.DestroySelf());
        }