Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }