Ejemplo n.º 1
0
        public PlanetSystem CreatePlanetSystem(double period, double orbitRadius, double orbitPosition)
        {
            PlanetSystem ps = new PlanetSystem(this);
            ps.Movement = new CircularMovementStrategy(period, orbitRadius);
            ps.Animate(orbitPosition);

            planetSystems.Add(ps);

            return ps;
        }
Ejemplo n.º 2
0
            public PlanetSystem CreatePlanetSystem(double period, double orbitRadius, double orbitPosition)
            {
                PlanetSystem ps = new PlanetSystem(this, orbitRadius, orbitPosition);

                ps.Movement = new CircularMovementStrategy(period, orbitRadius);
                ps.Animate(orbitPosition);

                planetSystems.Add(ps);

                return(ps);
            }
Ejemplo n.º 3
0
        public PlanetSystemViewer(PlanetSystem planetSystem, OpenView openViewDelegate)
        {
            this.openViewDelegate = openViewDelegate;

            this.planetSystem = planetSystem;
            this.planetSystem.Moved += new MovedEventHandler(planetSystem_Moved);

            InitializeComponent();

            planetSystem_Moved(planetSystem);
        }
Ejemplo n.º 4
0
        public PlanetSystem CreatePlanetSystem(double period, double orbitRadius, double orbitPosition)
        {
            PlanetSystem ps = new PlanetSystem(this);
            ps.Movement = new CircularMovementStrategy(period, orbitRadius);
            ps.Animate(orbitPosition);

            planetSystems.Add(ps);

            OnChanged(); // Вызываем обработку события изменения

            return ps;
        }
Ejemplo n.º 5
0
        public PlanetSystem CreatePlanetSystem(double period, double orbitRadius, double orbitPosition)
        {
            PlanetSystem ps = new PlanetSystem(this);

            ps.Movement = new CircularMovementStrategy(period, orbitRadius);
            ps.Animate(orbitPosition);

            planetSystems.Add(ps);

            OnChanged(); // Вызываем обработку события изменения

            return(ps);
        }
Ejemplo n.º 6
0
 public Planet(PlanetSystem planetSystem)
 {
     this.planetSystem = planetSystem;
     this.Color        = Color.Blue;
     this.Radius       = 5;
 }
Ejemplo n.º 7
0
 public Satellite(PlanetSystem planetSystem)
 {
     this.planetSystem = planetSystem;
     this.Color = Color.Gray;
     this.Radius = 2;
 }
Ejemplo n.º 8
0
 public Satellite(PlanetSystem planetSystem)
 {
     this.planetSystem = planetSystem;
     this.Color        = Color.Gray;
     this.Radius       = 2;
 }
Ejemplo n.º 9
0
 public Planet(PlanetSystem planetSystem)
 {
     this.planetSystem = planetSystem;
     this.Color = Color.Blue;
     this.Radius = 5;
 }
Ejemplo n.º 10
0
 public Planet(PlanetSystem planetSystem)
 {
     this.planetSystem = planetSystem;
 }