Example #1
0
        public void ConfirmOccupiedCells()
        {
            List <CellObjCtrl> occupiedCtrls = GetOccupiedCellObjCtrls();

            foreach (CellObjCtrl ctrl in occupiedCtrls)
            {
                ChessDragRotator dragRotator =
                    ctrl.GetComponentInChildren <ChessDragRotator> ();
                dragRotator.enabled = false;
            }
        }
Example #2
0
 public void TurnDragRotaters(bool bEnable)
 {
     foreach (GameObject gb in _Cells)
     {
         if (gb != null)
         {
             ChessDragRotator dr = gb.GetComponentInChildren <ChessDragRotator> ();
             dr.enabled = bEnable;
         }
     }
 }
Example #3
0
        private void TurnDragRotatorForCellObjCtrl(CellObjCtrl ctrl, bool bON)
        {
            if (ctrl == null)
            {
                return;
            }
            ChessDragRotator dragRotator =
                ctrl.GetComponentInChildren <ChessDragRotator> ();

            dragRotator.enabled = bON;
        }
Example #4
0
        // 开关转向操作UI
        // 目前,只允许刚落入的棋子能够随意转向
        public bool IsTurnDirUION(Hex coord)
        {
            CellObjCtrl cctrl = _GridCtrl.GetCellCtrlAt(coord);

            if (cctrl == null)
            {
                return(false);
            }
            ChessDragRotator dragRoter =
                cctrl.GetComponentInChildren <ChessDragRotator> ();

            return(dragRoter.enabled);
        }
Example #5
0
        private bool TurnDragRotatorUI(Hex coord, bool bEnable)
        {
            CellObjCtrl cctrl = _GridCtrl.GetCellCtrlAt(coord);

            if (cctrl == null)
            {
                return(false);
            }

            ChessDragRotator dragRoter =
                cctrl.GetComponentInChildren <ChessDragRotator> ();

            dragRoter.enabled = bEnable;
            return(true);
        }
Example #6
0
        public bool TurnDragRotaterAt(Hex pos, bool bEnable)
        {
            bool bExist =
                _HexToCells.ContainsKey(pos);

            if (bExist)
            {
                GameObject       cellobj = GetCellObjAt(pos);
                ChessDragRotator dr      = cellobj.GetComponentInChildren <ChessDragRotator> ();
                dr.enabled = bEnable;
                return(true);
            }
            else
            {
                return(false);
            }
        }