Пример #1
0
        public virtual List <IUnit> GetAllTargets(int row, int col)
        {
            if (Unit.CurrentCoolDown > 0)
            {
                return(null);
            }
            var team    = BoardHandler.GetOpponent(Unit.Team);
            var enemies = TeamHandler.GetUnitsAround(team, row, col, Unit.Range);

            return(enemies);
        }
Пример #2
0
        public override List <IUnit> GetAllTargets(int row, int col)
        {
            if (Unit.CurrentCoolDown > 0)
            {
                return(null);
            }

            var team      = BoardHandler.GetOpponent(Unit.Team);
            var adjacents = TeamHandler.GetUnitsAround(team, row, col, 1);

            if (adjacents != null && adjacents.Count > 0)
            {
                return(null);
            }

            return(base.GetAllTargets(row, col));
        }