Ejemplo n.º 1
0
        /**清理游戏过程中产生的牌**/
        public void cleanCardInTable()
        {
            if (putOutCard != null)
            {
                GameObject.Destroy(putOutCard);
                putOutCard = null;
            }

            if (lastCardOnTable != null)
            {
                lastCardOnTable = null;
            }

            for (int i = 0; i < 4; i++)
            {
                CardGOs cgo = allCardGOs [i];
                destroyListGO(cgo.Hand);                 //手牌
                destroyListGO(cgo.Table);                //桌上的牌
                destroyListListGO(cgo.PGC);              //碰杠吃的牌
            }

//			if (pickCardItem != null) {
//				GameObject.Destroy (pickCardItem);
//			}

            if (otherPickCardItem != null)
            {
                GameObject.Destroy(otherPickCardItem);
            }
        }
Ejemplo n.º 2
0
 public void init(GameView host)
 {
     _host      = host;
     _data      = _host.Data;
     allCardGOs = new List <CardGOs> (4);
     for (int i = 0; i < 4; i++)
     {
         CardGOs cgo = new CardGOs();
         cgo.HandParent  = host.HandParents [i];
         cgo.TableParent = host.TableParents [i];
         cgo.PGCParent   = host.PGCParents [i];
         cgo.PlayerItem  = host.PlayerItemViews [i];
         allCardGOs.Add(cgo);
     }
 }