public void DrawCard() { int n = cardsInDeck.Count; if (n <= 0) { return; } // generate a card at deck positoin Vector3 pos = new Vector3(0.3f, 0.11f, -2.9f); CardBehavior go = Instantiate(card, pos, Quaternion.identity); string s = cardsInDeck[n - 1]; // get and remove a card cardsInDeck.RemoveAt(n - 1); go.SetTexture(s); cardsInHand.Add(go); go.inHand = true; //Frame frame = provider.CurrentFrame; /* * foreach (Hand hand in frame.Hands) * { * if (hand.IsLeft) * { * go.attachedTo = hand; * } * * } */ }