Exemplo n.º 1
0
        public int GetCpgIndex(int chair, CpgData data)
        {
            foreach (CpgSaveData cpgSaveData in _saveList[chair])
            {
                if (cpgSaveData.type == data.Type && CompareValue(cpgSaveData.value, data.AllCards().ToArray()))
                {
                    return(cpgSaveData.index);
                }
            }

            return(UtilDef.DefInt);
        }
Exemplo n.º 2
0
        //加入麻将到当前
        protected virtual void AddMahjong()
        {
            //根据吃碰杠数据 从麻将管理中 取得麻将
            MahjongList = MahjongManager.Instance.GetMahjongList(Data.AllCards().ToArray());

            foreach (MahjongItem item in MahjongList)
            {
                item.transform.parent = transform;
                item.Reset();

                if (item.Value == Data.Laizi)
                {
                    item.IsSign = true;
                }
            }
        }
Exemplo n.º 3
0
 public CpgSaveData(CpgData data, int index)
 {
     type       = data.Type;
     value      = data.AllCards().ToArray();
     this.index = index;
 }