Esempio n. 1
0
        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;
 }
Esempio n. 3
0
 public void OnDrop(CardModel cardModel)
 {
     AddCard(cardModel.Value);
 }
Esempio n. 4
0
 public void ShowCardZoomed(CardModel cardModel)
 {
     SelectedCardModel = cardModel;
     ShowCardZoomed();
 }