Example #1
0
        public void ConfigAttackersForEveryCell()
        {
            foreach (GameObject ctrlObj in _Cells)
            {
                CellObjCtrl ctrl = ctrlObj.GetComponent <CellObjCtrl> ();

                MiroV1PlacementMgr.ConfigAttackersFor(ctrlObj.transform, true);
            }
        }
Example #2
0
        // absorbing configuration
        void ConfigAbsorbing()
        {
            //int bwdDir = _cellCtrl.GetBwdDir ();
            MiroModelV1 modelMe  = CellObjCtrlUtils.GetMiroModelFromCell(_cellCtrl);
            CellObjCtrl fwdCtrl  = CellObjCtrlUtils.GetFwdCellObjCtrl(_cellCtrl);
            MiroModelV1 modelFwd = CellObjCtrlUtils.GetMiroModelFromCell(fwdCtrl);

            ConfigureHole2(modelMe, true);
            ConfigureHole2(modelFwd, true);

            MiroV1PlacementMgr.ConfigAbsorbingForTF(_cellCtrl.transform);
            MiroV1PlacementMgr.ConfigAbsorbingForTF(fwdCtrl.transform);
        }
Example #3
0
        private bool SetID(int id)
        {
            MiroV1PlacementMgr mgr = GetComponent <MiroV1PlacementMgr> ();
            int maxCnt             = mgr._MiroPrefabs.Count;

            if (id >= maxCnt)
            {
                return(false);
            }
            mgr.SetMiroPrefabID(id);

            return(true);
        }
Example #4
0
        override protected void _Calculate()
        {
            bool bCtrlling = CellObjCtrlUtils.IsControllingObj(_cellCtrl);

            if (!bCtrlling)
            {
                return;
            }
            HexCoord hc = _cellCtrl.GetComponent <HexCoord> ();

            MiroV1ModelSetting mSetThis =
                _cellCtrl._TgtObj.GetComponent <MiroV1ModelSetting> ();
            MiroModelV1 model = mSetThis.GetComponent <MiroModelV1> ();

            OperateFwdAnteller(hc, mSetThis, model);
            OperateBwdAnteller(hc, mSetThis, model);

            MiroV1PlacementMgr.ConfigAbsorbingSrcForTF(_cellCtrl.transform);
        }
Example #5
0
        void ConfigAbsorbForCtrl2(CellObjCtrl ctrl)
        {
            for (int dir = 0; dir < 6; dir++)
            {
                CellObjCtrl nbCtrl = CellObjCtrlUtils.GetNbCellObjCtrl(ctrl, dir);

                bool bShouldBeingAbsorbed =
                    CellObjCtrlUtils.ShouldBeingAbsorbedToDir(ctrl, dir);
                if (!bShouldBeingAbsorbed)
                {
                    continue;
                }

                MiroV1PlacementMgr.ConfigAbsorbingForTF(nbCtrl.transform);
                if (!_AbsorbingCtrls.Contains(nbCtrl))
                {
                    _AbsorbingCtrls.Add(nbCtrl);
                }
            }
        }