public override string ToString() { CardinalDirections orientationValue = (CardinalDirections)myOrientation; string directionValue = orientationValue.ToString(); return(String.Format("{0} {1} {2}", myX, myY, directionValue)); }
} // end of function Draw(Graphics g) #region original DrawDebugInfo(Graphics g, ref PointF textPos) //protected override void DrawDebugInfo(Graphics g, ref PointF textPos) //{ // base.DrawDebugInfo(g, ref textPos); // SolidBrush sb = new SolidBrush(Color.DarkCyan); // DrawText(g, "Ballv6d0 Debug Info: ", sb, ref textPos); // DrawText(g, " ball angle scaledTo90: " + (ballAngleScaledToPiOver2 * 180 / pi).ToString(), sb, ref textPos); // DrawText(g, "predictedBounceAngle: " + (predictedBounceAngle * 180 / pi).ToString(), sb, ref textPos); // DrawText(g, "angleToRectCenter: " + (angleToRectCenter * 180 / pi).ToString(), sb, ref textPos); // DrawText(g, "modAngleToRectCenter: " + (modAngleToRectCenter * 180 / pi).ToString(), sb, ref textPos); // //DrawText(g, "cornerCalcAngle: " + (cornerCalcAngle * 180/pi).ToString(), sb, ref textPos); // DrawText(g, "collisionOnSide: " + collisionOnSide.ToString(), sb, ref textPos); // DrawText(g, "collisionOnCorner: " + collisionOnCorner.ToString(), sb, ref textPos); // DrawText(g, "ballHeading: " + genHeading.ToString(), sb, ref textPos); // DrawText(g, "rectCollisionSide: " + rectCollisionSide.ToString(), sb, ref textPos); // DrawText(g, "rcAngleDif: " + (rcAngleDif * 180 / pi).ToString(), sb, ref textPos); //} // end of function DrawDebugInfo(Graphics g, ref PointF textPos) #endregion original DrawDebugInfo(Graphics g, ref PointF textPos) protected override void DrawDebugInfo(Graphics g, ref PointF textPos) { base.DrawDebugInfo(g, ref textPos); SolidBrush sb = new SolidBrush(Color.DarkCyan); DrawText(g, "Ballv6d0 Debug Info: ", sb, ref textPos); //DrawText(g, "angleToRectCenter: " + (angleToRectCenter * 180 / pi).ToString(), sb, ref textPos); DrawText(g, "ballHeading: " + ballHeading.ToString(), sb, ref textPos); DrawText(g, "predictedBounceAngle: " + (predictedBounceAngle * 180 / pi).ToString(), sb, ref textPos); DrawText(g, "rectCollisionSide: " + rectCollisionSide.ToString(), sb, ref textPos); //DrawText(g, "angleToRectCenter: " + angleToRectCenter.ToString(), sb, ref textPos); } // end of function DrawDebugInfo(Graphics g, ref PointF textPos)
} // end of function Draw(Graphics g) protected void DrawDebugInfo(Graphics g, ref PointF textPos) { SolidBrush sb = new SolidBrush(Color.Peru); DrawText(g, "Ballv5d4d3 Debug Info:", sb, ref textPos); DrawText(g, "position: " + position.ToString(), sb, ref textPos); DrawText(g, "velocity: " + velocity.ToString(), sb, ref textPos); DrawText(g, "angle: " + angle.ToString(), sb, ref textPos); DrawText(g, "degrees: " + degrees.ToString(), sb, ref textPos); DrawText(g, "ballHeading: " + ballHeading.ToString(), sb, ref textPos); DrawText(g, "blockList.Count: " + blockList.Count.ToString(), sb, ref textPos); DrawText(g, "collision check points on ball: " + ccMarkerList.Count.ToString(), sb, ref textPos); } // end of function DrawDebugInfo(Graphics g, ref PointF textPos)
} // end of function Draw(Graphics g) protected virtual void DrawDebugInfo(Graphics g, ref PointF textPos) { SolidBrush sb = new SolidBrush(Color.Peru); DrawText(g, "Ballv5d4d2 Debug Info:", sb, ref textPos); DrawText(g, "position: " + position.ToString(), sb, ref textPos); DrawText(g, "velocity: " + velocity.ToString(), sb, ref textPos); DrawText(g, "angle: " + angle.ToString(), sb, ref textPos); DrawText(g, "degrees: " + degrees.ToString(), sb, ref textPos); DrawText(g, "ballHeading: " + ballHeading.ToString(), sb, ref textPos); DrawText(g, "blockList.Count: " + blockList.Count.ToString(), sb, ref textPos); DrawText(g, "collisionPointList.Count: " + collisionPointList.Count.ToString(), sb, ref textPos); DrawText(g, "block collision side: " + rectCollisionSide.ToString(), sb, ref textPos); DrawText(g, "angleTorc: " + (angleTorc * 180 / pi).ToString(), sb, ref textPos); DrawText(g, "modAngle: " + (modAngle * 180 / pi).ToString(), sb, ref textPos); g.DrawLine(Pens.Black, position, tempPos); } // end of function DrawDebugInfo(Graphics g, ref PointF textPos)
} // end of function Draw(Graphics g) protected virtual void DrawDebugInfo(Graphics g, ref PointF textPos) { SolidBrush sb = new SolidBrush(Color.Peru); DrawText(g, "Ballv5d4 Debug Info:", sb, ref textPos); DrawText(g, "position: " + position.ToString(), sb, ref textPos); DrawText(g, "velocity: " + velocity.ToString(), sb, ref textPos); DrawText(g, "angle: " + angle.ToString(), sb, ref textPos); DrawText(g, "degrees: " + degrees.ToString(), sb, ref textPos); DrawText(g, "ballHeading: " + ballHeading.ToString(), sb, ref textPos); DrawText(g, "index of collision marker making collision: " + ccIndex.ToString(), sb, ref textPos); DrawText(g, "angleToRectCenter: " + (angleToRectCenter * 180 / pi).ToString(), sb, ref textPos); DrawText(g, "rectCollisionSide: " + rectCollisionSide.ToString(), sb, ref textPos); DrawText(g, "cp: " + cp.ToString(), sb, ref textPos); //DrawText(g, "ccIndexRange: {" + ccIRange[0] + "," + ccIRange[1] + "," + ccIRange[2] + "}", sb, ref textPos); g.DrawLine(Pens.Black, cp, rectCenter); } // end of function DrawDebugInfo(Graphics g, ref PointF textPos)
public string GetFinalDirection() { return(direction.ToString()); }