Пример #1
0
        //玩家出牌
        public virtual CardFiveStarCard AddChuCard(int cardSize)
        {
            CardFiveStarCard card = CardFiveStarCardPool.Ins.Create(ChuCardType, cardSize, _ChuCardGroupsGo.transform);

            _ChuCards.Add(card);
            return(card);
        }
Пример #2
0
        //增加出的牌
        public override CardFiveStarCard AddChuCard(int cardSize)
        {
            int groupIndex        = _ChuCards.Count / 10;
            CardFiveStarCard card = CardFiveStarCardPool.Ins.Create(ChuCardType, cardSize, _ChuCardGroups[groupIndex], 0.53f);

            _ChuCards.Add(card);
            return(card);
        }
        public override CardFiveStarCard AddChuCard(int cardSize)
        {
            int groupIndex        = _ChuCards.Count / 10;
            CardFiveStarCard card = CardFiveStarCardPool.Ins.Create(ChuCardType, cardSize, _ChuCardGroups[groupIndex]);

            card.gameObject.transform.SetAsFirstSibling();;
            _ChuCards.Add(card);
            return(card);
        }
Пример #4
0
        //显示手牌 和赢的牌
        public void ShowHand(RepeatedField <int> cards)
        {
            int _childCount = _currShowCardCount++;

            for (int i = 0; i < cards.Count; i++)
            {
                CardFiveStarCard cardEntity = CardFiveStarCardPool.Ins.Create(CardFiveStarCardType.Down_ZhiLi_ZhengMain, cards[i],
                                                                              _HandGroupParentTrm.GetChild(_childCount), 0.45f);
                _Cards.Add(cardEntity);
            }
        }
Пример #5
0
        //显示碰杠
        public void ShowPengGang(int card, int count)
        {
            int _childCount = _currShowCardCount++;

            for (int i = 0; i < count; i++)
            {
                CardFiveStarCard cardEntity = CardFiveStarCardPool.Ins.Create(CardFiveStarCardType.Down_ZhiLi_ZhengMain, card,
                                                                              _HandGroupParentTrm.GetChild(_childCount), 0.45f);
                _Cards.Add(cardEntity);
            }
        }
Пример #6
0
 public PengGangBtn(GameObject go)
 {
     gameObject = go;
     gameObject.transform.SetAsFirstSibling();
     _PengGangBtn      = go.FindChild("PengGangBtn").GetComponent <Button>();
     _PengGangImage    = go.FindChild("PengGangBtn").GetComponent <Image>();
     _CardFiveStarCard = CardFiveStarCardPool.Ins.Create(CardFiveStarCardType.Down_ZhiLi_ZhengMain,
                                                         go.FindChild("CardPointGo"), 0.7f);
     _CardFiveStarCard.LocalPositionZero();
     _PengGangBtn.Add(Cilck);
 }
Пример #7
0
 public virtual void RefreshHintPanel(List <int> cards)
 {
     Show();
     TiaoZhengBgWidthAndHeight(cards);
     ClearCards();
     for (int i = 0; i < cards.Count; i++)
     {
         CardFiveStarCard card = CardFiveStarCardPool.Ins.Create(CardFiveStarCardType.Down_ZhiLi_ZhengMain, cards[i], _HintCardGroupTrm,
                                                                 0.4f);
         _HintCards.Add(card);
     }
 }
Пример #8
0
 public void ClearPengGangCards()
 {
     foreach (var card in _PengGangCards)
     {
         card.Destroy();
     }
     _PengGangCards.Clear();
     _GangPaiCard?.Destroy();
     _GangPaiCard = null;
     _Pointer.SetActive(false);
     _GangPointer?.SetActive(false);
 }
Пример #9
0
 public void ShowMaiMaPai(int maCard)
 {
     if (maCard <= 0)
     {
         mMaiMaGo.SetActive(false);
         return;
     }
     mMaiMaGo.SetActive(true);
     if (_MaiMaCard == null)
     {
         _MaiMaCard = CardFiveStarCardPool.Ins.Create(CardFiveStarCardType.Down_ZhiLi_ZhengMain, mMaPaiPointGo.transform, 0.5f);
         _MaiMaCard.LocalPositionZero();
     }
     _MaiMaCard.SetCardUI(maCard);
 }
        //出牌动画和音效
        public IEnumerator ChuCardAnimSound(int card, Vector3 animCardStatPoint, float scaleSize = 1f)
        {
            CardFiveStarSoundMgr.Ins.PlaySound(_user.Sex, FiveStarOperateType.ChuCard, card);//出牌 喊话 音效
            CardFiveStarCard newChuCard = AddChuCard(card);
            CardFiveStarCard animCard   = CardFiveStarCardPool.Ins.Create(ChuCardType, card, _NewHandPointGo.transform);

            animCard.gameObject.transform.position = animCardStatPoint;
            newChuCard.SetImageActive(false);
            yield return(new WaitForFixedUpdate());

            animCard.gameObject.transform.DOMove(newChuCard.gameObject.transform.position, 0.4f);
            animCard.gameObject.transform.DOScale(VectorHelper.GetSameVector3(scaleSize), 0.4f);
            yield return(new WaitForSeconds(0.4f));

            newChuCard.SetImageActive(true);
            ChuCardJianTouMgr.Ins.Show(newChuCard.gameObject, ChuCardJianTouYAxleOffset);
            animCard.Destroy();
            CardFiveStarSoundMgr.Ins.PlaySound(SexType.None, FiveStarOperateType.ChuCardFall);//出牌落地 音效
        }
Пример #11
0
        public void SetUI(int cardSize)
        {
            Show();
            if (_card == null)
            {
                _card = CardFiveStarCardPool.Ins.Create(CardFiveStarCardType.Down_ZhiLi_ZhengMain, cardSize, _CardPointGo,
                                                        0.6f);
                _card.LocalPositionZero();
            }
            else
            {
                _card.SetCardUI(cardSize);
            }
            int selectChuCard  = UIComponent.GetUiView <FiveStarMingPaiHintPanelComponent>()._SelectChuCard;
            int multipleNum    = CardFiveStarHandComponent.Ins.GetCardInMultiple(cardSize, selectChuCard);
            int residueCardNum = CardFiveStarRoom.Ins._AllCardResidueNum[cardSize];

            _DescText.text =
                $"{multipleNum}<color=#494949FF>倍</color>\n{residueCardNum}<color=#494949FF>张</color>";
        }
Пример #12
0
        public async Task ShowMaiMaCard(int card, int score)
        {
            Show();
            mSocreText.text = string.Empty;
            for (int i = 0; i < 2; i++)
            {
                await ShowOneAnim();
            }
            if (_MaiMaCard == null)
            {
                _MaiMaCard = CardFiveStarCardPool.Ins.Create(CardFiveStarCardType.Down_ZhiLi_ZhengMain, card,
                                                             mMaiMaCardPointGo.transform, 0.8f);
                _MaiMaCard.LocalPositionZero();
            }
            else
            {
                _MaiMaCard.SetCardUI(card);
            }
            mSocreText.text = "J" + score;
            await ETModel.Game.Scene.GetComponent <TimerComponent>().WaitAsync(1000);

            Hide();
            _MaiMaCard.SetActive(false);
        }
Пример #13
0
 //销毁一个牌的实体
 public void DestroyJoyLandlordsCard(CardFiveStarCard cardFiveStarCard)
 {
     cardFiveStarCard.SetParent(_poolGo.transform);
     CardGoPool[cardFiveStarCard.CardType].Add(cardFiveStarCard);
 }
Пример #14
0
 //单独显示杠的一张牌
 private void ShowGangCard(int cardType)
 {
     _GangPaiCard = CardFiveStarCardPool.Ins.Create(cardType, _CardSize, _GangCardPoint);
     _GangPaiCard.LocalPositionZero();
 }
Пример #15
0
 public void CreateWinCard()
 {
     _WinCard = CardFiveStarCardPool.Ins.Create(LaingCardType, _WinCardPointGo.transform);
     _WinCard.LocalPositionZero();//本地左边归0
 }
Пример #16
0
 public void CreateMoCard()
 {
     _MoCard = CardFiveStarCardPool.Ins.Create(HandType, _NewHandPointGo.transform);
     _MoCard.LocalPositionZero();//本地左边归0
 }