Ejemplo n.º 1
0
        public void Draw(GameTime gameTime, LineBatch batch)
        {
            for (int i = 0; i < Connections.Count; i++) {
                batch.DrawLine(1.0f, Color.White, Lines[Connections[i][0]].End, Lines[Connections[i][1]].End);//draws each connection in connections
            }

            batch.DrawLine(1.0f, Color.Red, ThrustVector);

            if (DEBUG)
            {
                foreach (KeyValuePair<String, Line> entry in Lines)//draws debug lines to each point
                {
                    batch.DrawLine(1.0f, Color.Blue, entry.Value);
                }
            }
        }
Ejemplo n.º 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.

            blank = new Texture2D(GraphicsDevice, 1, 1, false, SurfaceFormat.Color);
            blank.SetData(new[] { Color.White });
            lineBatch = new LineBatch(GraphicsDevice,blank);
            spritefont = Content.Load<SpriteFont>("SpriteFont1");
            // TODO: use this.Content to load your game content here
        }