private void OnAddCardModel(CardZone cardZone, CardModel cardModel) { cardModel.transform.rotation = Quaternion.identity; cardModel.IsFacedown = false; cardModel.DoubleClickAction = CardActions.FlipFace; countLabel.text = contentCardZone.GetComponentsInChildren <CardModel>().Length.ToString(); if (_cardStack == null) { return; } int cardCount = cardZone.GetComponentsInChildren <CardModel>().Length; int index = cardCount - 1 - cardModel.transform.GetSiblingIndex(); if (CgsNetManager.Instance.isNetworkActive) { CgsNetManager.Instance.LocalPlayer.RequestInsert(_cardStack.gameObject, index, cardModel.Id); } else { _cardStack.Insert(index, cardModel.Id); } }
public void ZoomOn(CardModel cardModel) { SelectedCardModel = cardModel; Zoom = true; }
public void OnDrop(CardModel cardModel) { AddCard(cardModel.Value); }
public void ShowCardZoomed(CardModel cardModel) { SelectedCardModel = cardModel; ShowCardZoomed(); }