Ejemplo n.º 1
0
 public void SetCanDragMJ(bool bDrag)
 {
     for (int i = 0; i < MJ_IN_List.Count; i++)
     {
         MJ_Drag md = MJ_IN_List[i].GetComponent <MJ_Drag>();
         if (md)
         {
             md.enabled = bDrag;
         }
     }
 }
Ejemplo n.º 2
0
 //设置不能选择麻将
 public void SetCannotSelect(MJType type)
 {
     for (int i = 0; i < MJ_IN_List.Count; i++)
     {
         if (MJ_IN_List[i].type == type)
         {
             MJ_IN_List[i].SetColor(new Color(0.3f, 0.3f, 0.3f));
             MJ_Drag md = MJ_IN_List[i].GetComponent <MJ_Drag>();
             if (md)
             {
                 md.enabled = false;
             }
         }
     }
 }
Ejemplo n.º 3
0
Archivo: MJ.cs Proyecto: dydlegd/DT
        public void Init(MJType type, MJ_STAGE stage, int playerId, Panel_Player playerPanel)
        {
            mTrans = this.transform;
            SetType(type);
            this.stage       = stage;
            PlayerID         = playerId;
            Depth            = 0;
            this.playerPanel = playerPanel;
            sprite.color     = Color.white;
            GetComponent <BoxCollider>().enabled = false;
            if ((stage == MJ_STAGE.IN || stage == MJ_STAGE.CPGResult) && !DataCenter.Instance.hFdata.IsHuiFanging)
            {
                GetComponent <BoxCollider>().enabled = true;
            }
            //ShowArrow(false);
            MJ_Drag md = GetComponent <MJ_Drag>();

            if (md)
            {
                md.enabled = false;
            }
        }
Ejemplo n.º 4
0
        protected override MJ AddMJ(MJType type, MJ_STAGE stage, bool bBack = false)
        {
            MJ  mj       = base.AddMJ(type, stage, bBack);
            int playerId = DataCenter.Instance.gamedata.PlayerID;

            if (stage == MJ_STAGE.IN &&
                ControlCenter.Instance.IsChuPaing
                )
            {
                bool bCanSelect = true;
                for (int i = 0; i < DataCenter.Instance.players[playerId].cannotChuMJList.Count; i++)
                {
                    if (type == DataCenter.Instance.players[playerId].cannotChuMJList[i])
                    {
                        bCanSelect = false;
                        break;
                    }
                }
                if (bCanSelect)
                {
                    if (!DataCenter.Instance.hFdata.IsHuiFanging)
                    {
                        MJ_Drag md = mj.GetComponent <MJ_Drag>();
                        if (md)
                        {
                            md.enabled = true;
                        }
                    }
                }
                else
                {
                    mj.SetColor(new Color(0.3f, 0.3f, 0.3f));
                }
            }
            return(mj);
        }