コード例 #1
0
ファイル: StarSystem.cs プロジェクト: alno/hse-oop-csharp
        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;
        }
コード例 #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);
            }
コード例 #3
0
ファイル: StarSystem.cs プロジェクト: alno/hse-oop-csharp
        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;
        }
コード例 #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);
        }