private void HighlightHand(object sender, RoutedEventArgs e) { HandDisplay source = (HandDisplay)e.OriginalSource; if (source.PlayerHand != null) { gameBoard.SelectExclusiveCards(new List <Card>(source.PlayerHand)); e.Handled = true; } }
private void GenerateHand(int index) { GameObject go = Instantiate(handPrefab, placeHolders[index].transform); go.transform.localPosition = Vector3.zero; HandDisplay handDisplay = go.GetComponent <HandDisplay>(); handDisplay.player = players.Items[index]; hands.Add(go); }
private void SelectHand(object sender, RoutedEventArgs e) { HandDisplay source = (HandDisplay)e.OriginalSource; if (source.PlayerHand != null) { List <Card> clone = new List <Card>(); IEnumerator <Card> enumerator = source.PlayerHand.GetAllCards(); while (enumerator.MoveNext()) { clone.Add(enumerator.Current); } gameBoard.SelectExclusiveCards(clone); e.Handled = true; } }