Пример #1
0
        public override int GetActionPriority()
        {
            if (ActionsHolder.HasTarget(Selection.ThisShip))
            {
                return(0);
            }

            EnemiesInArcHolder = HostShip.SectorsInfo.GetEnemiesInAllSectors();
            foreach (ArcFacing arcFacing in HostShip.GetAvailableArcFacings())
            {
                if (EnemiesInArcHolder[arcFacing].Count > 0)
                {
                    return(100);
                }
            }

            return(1);
        }
Пример #2
0
        public override int GetActionPriority()
        {
            int priority = 0;

            //If we don't have a target to shoot in current arcs, but have a target to shoot in available turret sector - rotate arc
            if (!ActionsHolder.HasTarget(Selection.ThisShip))
            {
                EnemiesInArcHolder = HostShip.SectorsInfo.GetEnemiesInAllSectors();
                foreach (ArcFacing arcFacing in HostShip.GetAvailableArcFacings())
                {
                    if (EnemiesInArcHolder[arcFacing].Count > 0)
                    {
                        priority = 100;
                    }
                }
            }

            return(priority);
        }