private void onPickIndexChange()
 {
     for (int i = 0; i < dirGameList.Count; i++)
     {
         dirGameList [i].SetActive(false);
     }
     dirGameList [(int)_data.toGameDir(_data.pickIndex)].SetActive(true);
 }
Beispiel #2
0
        public void start()
        {
            for (int i = 0; i < _data.AvatarList.Count; i++)
            {
                var       cgo = getCardGOs(i);
                Direction dir = _data.toGameDir(i);
                //avatar
                ReplayAvatarVO rvo = _data.AvatarList [i];
                cgo.PlayerItem.setAvatarVo(rvo);


                int[] tempPai = rvo.getPaiArray();
                for (int a = 0; a < tempPai.Length; a++)
                {
                    var num = tempPai [a];
                    if (num > 0)
                    {
                        GameObject temp = null;
                        for (int b = 0; b < num; b++)
                        {
                            temp = newGameObject("Prefab/playBack/HandCard_" + dir.ToString(), cgo.HandParent, Vector3.one);
                            temp.GetComponent <PutoutCardView> ().setPoint(a, _data.toGameDir(i));

                            if (dir == Direction.R)
                            {
                                temp.transform.SetSiblingIndex(0);
                            }
                            cgo.Hand.Add(temp);
                        }
                    }
                }
            }
            rangeHandCard();
        }