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