public Satellite CreateSatellite() { Random rand = new Random(); Satellite sat = new Satellite(this); double period = rand.NextDouble() * 100 + 50; double startTime = rand.NextDouble() * 200; double orbitRadius = rand.NextDouble() * (satellites.Count * 4 + 3) + 7; sat.Movement = new CircularMovementStrategy(period, orbitRadius); sat.Animate(startTime); satellites.Add(sat); return(sat); }
public Satellite CreateSatellite() { Random rand = new Random(); Satellite sat = new Satellite(this); double period = rand.NextDouble() * 100 + 50; double startTime = rand.NextDouble() * 200; double orbitRadius = rand.NextDouble() * (satellites.Count * 4 + 3) + 7; sat.Movement = new CircularMovementStrategy(period, orbitRadius); sat.Animate(startTime); satellites.Add(sat); OnChanged(); // Вызываем обработку события изменения return(sat); }
public Satellite CreateSatellite() { Random rand = new Random(); Satellite sat = new Satellite(this); double period = rand.NextDouble() * 100 + 50; double startTime = rand.NextDouble() * 200; double orbitRadius = rand.NextDouble() * (satellites.Count * 4 + 3) + 7; sat.Movement = new CircularMovementStrategy( period, orbitRadius ); sat.Animate(startTime); satellites.Add(sat); return sat; }
public Satellite CreateSatellite() { Random rand = new Random(); Satellite sat = new Satellite(this); double period = rand.NextDouble() * 100 + 50; double startTime = rand.NextDouble() * 200; double orbitRadius = rand.NextDouble() * (satellites.Count * 4 + 3) + 7; sat.Movement = new CircularMovementStrategy( period, orbitRadius ); sat.Animate(startTime); satellites.Add(sat); OnChanged(); // Вызываем обработку события изменения return sat; }