Ejemplo n.º 1
0
        public void DoHurt()
        {
            bool bFwdEnemy = CellObjCtrlUtils.IsNbEnemy(_cellCtrl, 0);

            if (bFwdEnemy)
            {
                CCHurt fwdCCHurt =
                    CellObjCtrlUtils.GetComponentInNbCtrl <CCHurt> (_cellCtrl, 0);

                fwdCCHurt.BeHurt();
                //print (_cellCtrl._TgtObj + " do hurt on:" + fwdCCHurt._cellCtrl._TgtObj);
            }
            else
            {
                MiroModelV1 modelMe = CellObjCtrlUtils.GetMiroModelFromCell(_cellCtrl);
                if (modelMe != null)
                {
                    modelMe.CeaseAttacking();
                }
            }
        }