示例#1
0
 public PathPreview(Path newPath, Path actualPath)
 {
     NewPath = newPath;
     ActualPath = actualPath;
     PPVisual = new PathPreviewVisual(newPath, actualPath, DoHideCompleted);
     PlayersStates = new Dictionary<GUIPlayer, PlayerState>();
 }
        public EndOfWorld1Animation(WorldScene worldScene)
            : base(worldScene, /*30000*/ int.MaxValue /*tmp*/)
        {
            Path = Simulator.PlanetarySystemController.Path;

            // Prepare celestial bodies to destroy
            CelestialBodiesToDestroy = new List<CelestialBody>();

            foreach (var cb in Path.CelestialBodies)
                if (cb != Path.FirstCelestialBody && cb != Path.LastCelestialBody)
                    CelestialBodiesToDestroy.Add(cb);

            MothershipAnimation = new MothershipAnimation(Simulator)
            {
                ArrivalZoom = 0.7f,
                DepartureZoom = 1f,
                CelestialBodies = CelestialBodiesToDestroy,
                TimeBeforeArrival = 0,
                TimeArrival = 5500,
                TimeBeforeLights = 5500,
                TimeLights = 2000,
                TimeBeforeDestruction = 7500,
                TimeBeforeDeparture = 17500,
                TimeDeparture = 5000
            };

            // Switch the music

            // Stop spawning enemies
            // Verify with Xbox 360 controller (vibration on edges)

            // To check:


            worldScene.NeedReinit = true;
            Simulator.SpawnEnemies = false;
            //Path.RemoveCelestialBody(Path.FirstCelestialBody);

            TmpEndOfAlpha = new Text("End of demo!", "Pixelite")
            {
                SizeX = 4,
                Alpha = 0,
                VisualPriority = VisualPriorities.Default.Path + 0.01
            }.CenterIt();
            Simulator.Scene.VisualEffects.Add(TmpEndOfAlpha, VisualEffects.FadeInFrom0(255, 20000, 2000));
        }
示例#3
0
 public void Commit(Path newPath)
 {
     CelestialBody.FakeHasGravitationalTurret = false;
     CelestialBody.FakeHasGravitationalTurretLv2 = false;
     CelestialBody = null;
     PathState = PathState.None;
 }
示例#4
0
            public void RollBack(Path newPath)
            {
                if (PathState == PathState.None)
                    return;

                switch (PathState)
                {
                    case PathState.ObjectAdded:
                        newPath.RemoveCelestialBody(CelestialBody);
                        CelestialBody.FakeHasGravitationalTurret = false;
                        break;
                    case PathState.ObjectRemoved:
                        newPath.AddCelestialBody(CelestialBody, false);
                        break;
                    case PathState.ObjectUpgraded:
                        CelestialBody.FakeHasGravitationalTurretLv2 = false;
                        break;
                }


                CelestialBody = null;
                PathState = PathState.None;
            }
示例#5
0
            public void ChangeState(PathState state, Path newPath, CelestialBody cb)
            {
                CelestialBody = cb;
                PathState = state;

                switch (state)
                {
                    case PathState.ObjectAdded:
                        cb.FakeHasGravitationalTurret = true;
                        newPath.AddCelestialBody(cb, true);
                        break;
                    case PathState.ObjectRemoved:
                        newPath.RemoveCelestialBody(cb);
                        break;
                    case PathState.ObjectUpgraded:
                        cb.FakeHasGravitationalTurretLv2 = true;
                        break;
                }
            }
 public LevelEndedAnnunciation(Simulator simulator, Path path, Level level)
 {
     Simulator = simulator;
     Path = path;
     Level = level;
 }