Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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;
        }
Пример #4
0
        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;
        }