Esempio n. 1
0
 public TargetManager2(IRadar radar)
 {
     this.radar          = radar;
     this.aircraftScript = radar.AircraftScript;
     aircraftScript.TargetingSystem.TargetAdded   += OnTargetAdded;
     aircraftScript.TargetingSystem.TargetRemoved += OnTargetRemoved;
 }
Esempio n. 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();
 }
Esempio n. 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());
            }
        }
Esempio n. 4
0
 public TargetManager(IRadar radar)
 {
     this.radar = radar;
 }