Пример #1
0
        public override void Initialize()
        {
            InitializeTiming();

            Logo = new LogoAnimation(Scene);
            Simulator = new SimulatorAnimation(Scene);
            Commander = new CommanderAnimation(Scene);
            Location = new LocationAnimation(Scene);
            Mothership = new MothershipAnimation(Simulator.Simulator)
            {
                TimeBeforeArrival = IntroCutscene.Timing["MothershipArrival"],
                TimeBeforeLights = IntroCutscene.Timing["MothershipLights"],
                TimeBeforeDestruction = IntroCutscene.Timing["MothershipDestruction"],
                TimeBeforeDeparture = IntroCutscene.Timing["MothershipDeparture"],
                TimeArrival = 5500,
                TimeLights = 10000,
                TimeDeparture = 18000,
                ArrivalZoom = 0.7f,
                DepartureZoom = 1.5f
            };

            Protagonist = new ProtagonistsAnimation(Simulator.Simulator, Mothership.Mothership);
            Resistance = new ResistanceAnimation(Simulator.Simulator, Mothership.Mothership);
            Mothership.Battleships = Resistance.Battleships;
            Mothership.CelestialBodies = Simulator.Simulator.PlanetarySystemController.CelestialBodies;

            Length = 82000;

            Main.MusicController.PlayOrResume("CinematicIntro");
        }
        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));
        }