Example #1
0
        /// <summary>
        /// Draw lines on screen
        /// </summary>
        public override void draw()
        {
            float   angele = Rotation + (float)Math.PI / 6;
            Matrix  mat    = Matrix.CreateRotationZ(angele);
            Vector2 step   = Vector2.Transform(Vector2.UnitY, mat);
            Vector2 temp   = Position;

            while (StaticClass.map[temp].ToString() != "Obstacle" && (Position - temp).Length() <= 300)
            {
                temp += step * 2;
            }
            StaticClass.drawVec(Rotation + (float)Math.PI + (float)Math.PI / 6, Position, Color.Blue, (Position - temp).Length(), 3);
            angele = Rotation - (float)Math.PI / 6;
            mat    = Matrix.CreateRotationZ(angele);
            step   = Vector2.Transform(Vector2.UnitY, mat);
            temp   = Position;
            while (StaticClass.map[temp].ToString() != "Obstacle" && (Position - temp).Length() <= 300)
            {
                temp += step * 2;
            }
            StaticClass.drawVec(Rotation + (float)Math.PI - (float)Math.PI / 6, Position, Color.Blue, (Position - temp).Length(), 3);
            base.draw();
        }
Example #2
0
 public void draw()
 {
     StaticClass.drawVec(dir, l, Color.White, (start - l).Length(), 3);
 }
Example #3
0
 public void draw()
 {
     StaticClass.drawVec(0, new Vector2(v.X, v.Y + HiderHeight), Color.Red, HiderHeight * 2,
                         HiderWidth * 2);
 }