Beispiel #1
0
 public void loadNewHeightMap(string fileName)
 {
     lock (loadLock)
     {
         map      = loadVectorTexture(fileName, true);                                                           //loadVectorTexture(fileName,true);
         renderer = new HeightMapRenderer(Matrix.Identity, map, Content.Load <Texture2D>("720"), 512, 512, 1, 16, rendererEffect, graphics.GraphicsDevice);
         animator = new HeightMapAnimator(graphics, spriteBatch, 512, 512, renderer, new Vector3(3.732f, 1, 0)); //2.639f, 1, 2.639f));//3.732f, 1, 0));//
         first    = true;
         start    = false;
         animator.setWind(new Vector2(4, 0));
     }
 }
Beispiel #2
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.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            camera         = new Camera(new Vector3(0, 0, 0), Vector3.Forward, Vector3.Up, (float)Math.PI / 2, 800.0f / 600.0f);
            rendererEffect = Content.Load <Effect>("HeightMapRendererEffect");
            animatorEffect = Content.Load <Effect>("HeightMapAnimatorEffect");
            map            = loadVectorTexture("hm4");
            renderer       = new HeightMapRenderer(Matrix.Identity, map, Content.Load <Texture2D>("720"), 512, 512, 1, 16, rendererEffect, graphics.GraphicsDevice);
            animator       = new HeightMapAnimator(graphics, spriteBatch, 512, 512, renderer, new Vector3(3.732f, 1, 0));//2.639f, 1, 2.639f));//3.732f, 1, 0));//
            animator.setWind(new Vector2(4, 0));

            // TODO: use this.Content to load your game content here
        }