예제 #1
0
        public PieSliceDebugger(PieSlice pieSlice, float lineAngle1, float lineAngle2)
        {
            pieSliceDebugging = pieSlice;

            pieSliceDivider1 = new Line(pieSliceDebugging.Position,
                (int)pieSliceDebugging.radar.EntityRange * 2, Color.PowderBlue);
            pieSliceDivider1.RotateInDegrees(lineAngle1);

            pieSliceDivider2 = new Line(pieSliceDebugging.Position,
                (int)pieSliceDebugging.radar.EntityRange * 2, Color.PowderBlue);
            pieSliceDivider2.RotateInDegrees(lineAngle2);
        }
예제 #2
0
        public RangefinderDebugger(Rangefinder rangefinder)
        {
            rangefinderDebugging = rangefinder;

            for (int i = 0; i < rangefinderDebugging.Feelers.Count; i++)
            {
                Ray curFeeler = rangefinderDebugging.Feelers[i];

                Vector2 position2f = new Vector2(curFeeler.Position.X, curFeeler.Position.Y);
                Vector2 entityDir2f = rangefinderDebugging.SensingEntity.Heading;
                Vector2 feelerDir2f = new Vector2(curFeeler.Direction.X, curFeeler.Direction.Y);

                Line curLine = new Line(position2f, Rangefinder.MaxRayDistance, Color.PowderBlue);

                float radians = (float)Angles.AngleFromUToV(entityDir2f, feelerDir2f);
                curLine.RotateInRadians(radians);

                curLine.LineSprite.LocalOrigin = new Vector2(0.0f, curLine.LineSprite.BoundingBox.Height / 2);

                feelerLines.Add(new FeelerLine(i, curLine));
            }
        }
예제 #3
0
 public FeelerLine(int feelerIdx, Line line)
 {
     FeelerIndex = feelerIdx;
     VisualLine = line;
 }