示例#1
0
        public LinePrimitive CreateLinesForMinimap(Vector2 offset, Vector2 ratio, Color LineColor)
        {
            LinePrimitive lp = new LinePrimitive(Engine.Instance.Graphics.GraphicsDevice, LineColor);

            foreach (WayPoint wp in NextWaypoints)
            {
                lp.AddVector(offset + Location * ratio);
                lp.AddVector(offset + wp.Location * ratio);
            }
            return(lp);
        }
示例#2
0
        public void DebugDraw()
        {
            Color drawColor = Color.Red;

            if (IsStart)
            {
                drawColor = Color.Yellow;
            }
            else if (IsFinish)
            {
                drawColor = Color.Purple;
            }
            Engine.Instance.SpriteBatch.Draw(Common.White1px50Trans, new Rectangle(Location.Xi() - 2, Location.Yi() - 2, 5, 5), drawColor);
            foreach (WayPoint wp in NextWaypoints)
            {
                LinePrimitive lp = new LinePrimitive(Engine.Instance.Graphics.GraphicsDevice, Color.Blue);
                lp.AddVector(Location);
                lp.AddVector(wp.Location);
                lp.Render(Engine.Instance.SpriteBatch);
            }
        }