public override void FreshCard(List <Card> list, int index)
        {
            Vector3 pos = trans.position + new Vector3(0, list.Count * -0.25f, 0);

            if (index >= 0)
            {
                MCard cardObj = GetCardObj(list[index]);
                cardObj.SetState(CardState.Right);

                pos.y += 0.4f * (index + 1);
                ApplyCard(cardObj, pos);

                return;
            }

            foreach (var item in list)
            {
                MCard cardObj = GetCardObj(item);
                cardObj.SetState(CardState.Right);

                pos.y += 0.4f;

                ApplyCard(cardObj, pos);
            }
        }
Ejemplo n.º 2
0
        public override void DrawCard(Card card)
        {
            Vector3 pos = trans.position + new Vector3(3f, 0, 0);

            MCard cardObj = GetCardObj(card);

            cardObj.SetState(CardState.N);
            ApplyCard(cardObj, pos + new Vector3(2, 0, 0));
        }
Ejemplo n.º 3
0
        //出牌
        public void DropCard(Card card)
        {
            MCard cardObj = GetCardObj(card);

            cardObj.SetState(CardState.B);

            cardObj.transform.position   = GetDropCard();
            cardObj.transform.localScale = new Vector3(0.8f, 0.8f, 0.8f);
            cardObj.transform.SetParent(table);
        }
        public override void DrawCard(Card card)
        {
            MCard cardObj = GetCardObj(card);
            Vector3
                pos = trans.position + new Vector3(-2f, -3.8f, 0);

            cardObj.SetState(CardState.Left);

            ApplyCard(cardObj, pos + new Vector3(2, 0, 0));
        }
Ejemplo n.º 5
0
        public void ShowPengGang(List <Card> list)
        {
            pengPos += GetPengPosOffset();

            Vector3 pos = pengPos;

            for (int i = 0; i < list.Count; i++)
            {
                pos.x += 0.5f;

                MCard cardObj = GetCardObj(list[i]);
                cardObj.SetState(CardState.B);
                cardObj.transform.localScale = new Vector3(0.6f, 0.6f, 0.6f);
                cardObj.transform.position   = pos;
                cardObj.transform.SetParent(table);
            }
        }