Exemple #1
0
		/// <summary>
		/// Load your graphics content
		/// </summary>
		protected override void LoadContent()
		{
			mcSpriteBatch = new SpriteBatch(mcGraphics.GraphicsDevice);

			// Load fonts and models for test application
			mcFont = Content.Load<SpriteFont>("Fonts/font");
			mcFloorModel = Content.Load<Model>("grid");

			// Instance and Initialize the Particle System
			mcMyParticleSystem = new MyParticleSystem(this);
			mcMyParticleSystem.AutoInitialize(GraphicsDevice, Content, null);

			// Add the Particle System to the Particle System Manager
			mcParticleSystemManager.AddParticleSystem(mcMyParticleSystem);


			// Add a single particle to the particle system
			mcMyParticleSystem.AddParticle();
			
			// Add another particle to the particle system that represents the Pivot Point
			mcMyParticleSystem.AddParticle();
			mcMyParticleSystem.ActiveParticles.Last.Value.Position = msPivotPoint;
			mcMyParticleSystem.ActiveParticles.Last.Value.Width = 10;
			mcMyParticleSystem.ActiveParticles.Last.Value.Height = 10;
		}
Exemple #2
0
        /// <summary>
        /// Load your graphics content
        /// </summary>
        protected override void LoadContent()
        {
            mcSpriteBatch = new SpriteBatch(mcGraphics.GraphicsDevice);

            // Load fonts and models for test application
            mcFont = Content.Load<SpriteFont>("Fonts/font");
            mcFloorModel = Content.Load<Model>("grid");

            // Instance and Initialize the Particle System
            mcMyParticleSystem = new MyParticleSystem(this);
            mcMyParticleSystem.AutoInitialize(GraphicsDevice, Content, null);

            // Add the Particle System to the Particle System Manager
            mcParticleSystemManager.AddParticleSystem(mcMyParticleSystem);
        }
Exemple #3
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            mcSpriteBatch = new SpriteBatch(GraphicsDevice);
            mcFont = Content.Load<SpriteFont>("Fonts/font");

            // Setup the Terrain
            Texture2D cTerrainTexture = Content.Load<Texture2D>("Terrain/Desert");
            Texture2D cHeightMap = Content.Load<Texture2D>("Terrain/HeightMap");
            mcTerrain.Load(GraphicsDevice, cHeightMap, 3000, 3000, 200, cTerrainTexture, 3);

            // Setup the SkyBox
            Texture2D cBack = Content.Load<Texture2D>("SkyBox/sahara_south");
            Texture2D cFront = Content.Load<Texture2D>("SkyBox/sahara_north");
            Texture2D cBottom = Content.Load<Texture2D>("SkyBox/sahara_down");
            Texture2D cTop = Content.Load<Texture2D>("SkyBox/sahara_up");
            Texture2D cLeft = Content.Load<Texture2D>("SkyBox/sahara_west");
            Texture2D cRight = Content.Load<Texture2D>("SkyBox/sahara_east");
            mcSkyBox.Load(GraphicsDevice, 3000, 300, cBack, cFront, cBottom, cTop, cLeft, cRight);

            // Instance and Initialize the Particle System
            mcMyParticleSystem = new MyParticleSystem(this);
            mcMyParticleSystem.AutoInitialize(GraphicsDevice, Content, null);

            // Add the Particle System to the Particle System Manager
            mcParticleSystemManager.AddParticleSystem(mcMyParticleSystem);

            // Setup the Fog
            //mcTerrain.mcEffect.FogEnabled = true;
            mcTerrain.mcEffect.FogColor = Color.Gray.ToVector3();
            mcTerrain.mcEffect.FogEnd = 2000;

            //mcSkyBox.mcEffect.FogEnabled = true;
            mcSkyBox.mcEffect.FogColor = Color.Gray.ToVector3();
            mcSkyBox.mcEffect.FogEnd = 2000;
        }