Пример #1
0
 public TargetManager2(IRadar radar)
 {
     this.radar          = radar;
     this.aircraftScript = radar.AircraftScript;
     aircraftScript.TargetingSystem.TargetAdded   += OnTargetAdded;
     aircraftScript.TargetingSystem.TargetRemoved += OnTargetRemoved;
 }
Пример #2
0
 public void Boostrap <TRepository, TPalantir, TRadar>()
     where TRepository : IRepository, new()
     where TPalantir : IPalantir, new()
     where TRadar : IRadar, new()
 {
     Repository = new TRepository();
     Palantir   = new TPalantir();
     Radar      = new TRadar();
 }
Пример #3
0
        private ICoordinate TakeShot(Tuple <IKanon, IRadar> weaponcombi)
        {
            IRadar radar = weaponcombi.Item2;
            IKanon canon = weaponcombi.Item1;

            if (radar != null)
            {
                ICoordinate givenTarget = GetRandomShipCoordinate();
                ICoordinate target      = radar.Parse(givenTarget.GetX(), givenTarget.GetY());

                return(canon.Fire(target));
            }

            else
            {
                return(canon.Fire());
            }
        }
Пример #4
0
 public TargetManager(IRadar radar)
 {
     this.radar = radar;
 }