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); }
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)); } }
public FeelerLine(int feelerIdx, Line line) { FeelerIndex = feelerIdx; VisualLine = line; }