Exemplo n.º 1
0
        public override void Initialize()
        {
            // Components
            var services = Game.Services;

            var hudComponent = new HUDComponent(gameInstance);
            Game.Components.Add(hudComponent);
            Game.AddService(typeof(HUDComponent), hudComponent);

            var carControlComponent = new CarControlComponent(gameInstance);
            Game.Components.Add(carControlComponent);
            Game.AddService(typeof(CarControlComponent), carControlComponent);

            var triggerManager = new TriggerManager(gameInstance);
            Game.Components.Add(triggerManager);
            Game.AddService(typeof(TriggerManager), triggerManager);

            // Particle systems

            plasmaSystem = new PlasmaParticleSystem(gameInstance, content);
            Game.Components.Add(plasmaSystem);
            particleSystems.Add(plasmaSystem);

            redSystem = new RedPlasmaParticleSystem(gameInstance, content);
            Game.Components.Add(redSystem);
            particleSystems.Add(redSystem);

            yellowSystem = new YellowPlasmaParticleSystem(gameInstance, content);
            Game.Components.Add(yellowSystem);
            particleSystems.Add(yellowSystem);

            greenSystem = new GreenParticleSystem(gameInstance, content);
            Game.Components.Add(greenSystem);
            particleSystems.Add(greenSystem);

            airParticles = new AirParticleSystem(gameInstance, content);
            Game.Components.Add(airParticles);
            particleSystems.Add(airParticles);

            thunderParticleSystem = new ThunderParticleSystem(gameInstance, content);
            Game.Components.Add(thunderParticleSystem);
            particleSystems.Add(thunderParticleSystem);

            rainSystem = new RainParticleSystem(gameInstance, content);
            Game.Components.Add(rainSystem);
            particleSystems.Add(rainSystem);

            smokeSystem = new SmokeCloudParticleSystem(gameInstance, content);
            Game.Components.Add(smokeSystem);
            particleSystems.Add(smokeSystem);

            fireflySystem = new FireflySystem(gameInstance, content);
            Game.Components.Add(fireflySystem);
            particleSystems.Add(fireflySystem);

            dustSystem = new DustParticleSystem(gameInstance, content);
            Game.Components.Add(dustSystem);
            particleSystems.Add(dustSystem);

            fireSmokeSystem = new SmokePlumeParticleSystem(gameInstance, content);
            Game.Components.Add(fireSmokeSystem);
            particleSystems.Add(fireSmokeSystem);

            fireSystem = new FireParticleSystem(gameInstance, content);
            Game.Components.Add(fireSystem);
            particleSystems.Add(fireSystem);

            pauseMenu = new PauseMenu(gameInstance);
            pauseMenu.ChangeResolution();
            pauseMenu.Enabled = false;
            Game.Components.Add(pauseMenu);

            gameOverMenu = new GameOverMenu(gameInstance);
            gameOverMenu.ChangeResolution();
            gameOverMenu.Enabled = false;
            Game.Components.Add(gameOverMenu);

            //dustSystem.Enabled = false;
            //rainSystem.Enabled = false;
            //smokeSystem.Enabled = false;

            base.Initialize();
        }
 public ThunderBoltGenerator(GameManager game, ThunderParticleSystem thunderParticleSystem)
     : base(game)
 {
     particleSystem = thunderParticleSystem;
 }
Exemplo n.º 3
0
 public ThunderBoltGenerator(GameManager game, ThunderParticleSystem thunderParticleSystem)
     : base(game)
 {
     particleSystem = thunderParticleSystem;
 }