Akay2 0 Newbie Poster

Well i have a little problem here is the code

using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace RockRaidersRecreation
{
 
    /// Manager for Drawing Verts
  
    public class WallDrawManager : DrawableGameComponent
    {
        Texture2D wallTexture;
        BasicEffect basicEffect;
        Vector3 vector1 = new Vector3(0, 0, 0);
        Vector3 vector2 = new Vector3(0, 0, -10);
        Vector3 vector3 = new Vector3(10, 0, 0);
        Vector3 vector4 = new Vector3(10, 0, -10);
        List<Wall> wallList = new List<Wall>();

 public WallDrawManager(Game game)
            : base(game)
        {
            
        }

       
        public override void Initialize()
        {

            wallTexture = Game.Content.Load<Texture2D>(@"textures/2d/dirt");

            basicEffect = new BasicEffect(((Game1)Game).GraphicsDevice);

            wallList.Add(new Wall(
                wallTexture, basicEffect, new Vector3(500, 0, -500)));


            
           

            base.Initialize();
        }

        public override void Update(GameTime gameTime)
        {
            

            base.Update(gameTime);
        }

        public override void Draw(GameTime gameTime)
        {
            foreach (EffectPass pass in basicEffect.CurrentTechnique.Passes)
            {

                //camera info
                basicEffect.World = Matrix.Identity;
                basicEffect.View = ((Game1)Game).camera.view;
                basicEffect.Projection = ((Game1)Game).camera.projection;
                basicEffect.Texture = wallTexture;
                basicEffect.TextureEnabled = true;

                pass.Apply();

                GraphicsDevice.SamplerStates[0] = SamplerState.LinearClamp;

                for (int i = 0; i < wallList.Count; )
                {
                        GraphicsDevice.DrawUserPrimitives<VertexPositionTexture>
                    (PrimitiveType.TriangleStrip, "???", 0, 12);
                        i++;                    
                }   
            }

            base.Draw(gameTime);
        }
    }
}

On the last lines i dont know what to write there. it should draw every "wall" from the list

thx for help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.