Ejemplo n.º 1
0
        void ConfigAbsorbing()
        {
            //bool bFaceEnemy = CellObjCtrlUtils.IsNbEnemy (_cellCtrl,0);
            bool bShouldAttack = CellObjCtrlUtils.ShouldAttacking(_cellCtrl);

            if (!bShouldAttack)
            {
                return;
            }

            for (int dir = 1; dir < 6; dir++)
            {
                bool bNbAidingMe = CellObjCtrlUtils.IsNbAidingMe(_cellCtrl, dir);
                if (!bNbAidingMe)
                {
                    continue;
                }
                CellObjCtrl nbCtrl = CellObjCtrlUtils.GetNbCellObjCtrl(_cellCtrl, dir);
                ConfigAbsorbForCtrl2(nbCtrl);
            }

            /*
             * bool bBackToBack = CellObjCtrlUtils.IsBackToBack (_cellCtrl);
             * if (bBackToBack) {
             *      CellObjCtrl nbCtrl = CellObjCtrlUtils.GetNbCellObjCtrl (_cellCtrl, 3);
             *      _ToAbsorbCtrl = nbCtrl;
             *      //ConfigAbsorbForCtrl (nbCtrl);
             *      MiroModelV1 model = CellObjCtrlUtils.GetMiroModelFromCell(nbCtrl);
             *      _AT = model.GetAT ();
             *      _ToAbsorb = true;
             *      //print ("AT:" + _AT);
             *      //print ("ConfigAbsorbForCtrl (nbCtrl):" + nbCtrl);
             *      print("_ToAbsorb:" + nbCtrl);
             * }*/

            ConfigAbsorbForCtrl2(_cellCtrl);
        }