protected override void DrawHUD() { base.DrawHUD(); // Rotation. Vector2 rotationLine = new Vector2(-this.direction.Y, this.direction.X); AddDebugLine(rotationLine, Color.Blue, aVelocity * 7.0f, 7, 1); if (Debug) { DebugLine.DrawLines(); Vector2 position = new Vector2(10, 10); Padding padding = new Padding(0, GlobalManager.Pen.StringHeight("A")); //StateManager.AddMessage("Object: [\"" + Tag + "\"]", position, padding, drawColor, 0, ShapeDrawer.LEFT_ALIGN); //StateManager.AddMessage("[\"" + Tag + "\"] Position: " + new Point((int)(Position.X), (int)(Position.Y)) + "", position, padding, drawColor, 0, ShapeDrawer.LEFT_ALIGN); StateManager.AddMessage(new Message("[\"" + Tag + "\"] Speed: [" + (int)Speed + " pixels/second]", position, padding, drawColor, 0, ShapeDrawer.LEFT_ALIGN), new Message("[\"" + Tag + "\"] Velocity: " + new Point((int)(Velocity.X), (int)(Velocity.Y)) + "", position, padding, drawColor, 0, ShapeDrawer.LEFT_ALIGN), new Message("[\"" + Tag + "\"] Acceleration: " + new Point((int)(accelerationTrack.X), (int)(accelerationTrack.Y)) + " pixels/second^2", position, padding, drawColor, 0, ShapeDrawer.LEFT_ALIGN), new Message("[\"" + Tag + "\"] Angular Speed: [" + (int)MathHelper.ToDegrees(AngularSpeed) + " degrees/second] | [" + (int)AngularSpeed + " radians/second]", position, padding, drawColor, 0, ShapeDrawer.LEFT_ALIGN)); } // Reset the acceleration magnitude tracking value. accelerationTrack = new Vector2(0.0f, 0.0f); // Draw the pointer this.DrawHeading(); }
protected override void DrawHUD() { // Rotation. Vector2 rotationLine = new Vector2(-this.direction.Y, this.direction.X); AddDebugLine(rotationLine, Color.Blue, aVelocity * 7.0f, 7, 1); if (Debug) { DebugLine.DrawLines(); Point life = new Point((int)ttl, (int)lifetime); Vector2 position = new Vector2(10, 10); Padding padding = new Padding(0, GlobalManager.Pen.StringHeight("A")); StateManager.AddMessage("Object: [\"" + Tag + "\"]", position, padding, drawColor, 0, ShapeDrawer.LEFT_ALIGN); StateManager.AddMessage("[\"" + Tag + "\"] Position: " + new Point((int)(Position.X), (int)(Position.Y)) + "", position, padding, drawColor, 0, ShapeDrawer.LEFT_ALIGN); StateManager.AddMessage("[\"" + Tag + "\"] Speed: " + (int)Speed + "", position, padding, drawColor, 0, ShapeDrawer.LEFT_ALIGN); StateManager.AddMessage("[\"" + Tag + "\"] Time To Live: [" + life.X + " seconds out of " + life.Y + " seconds]", position, padding, drawColor, 0, ShapeDrawer.LEFT_ALIGN); StateManager.AddMessage("", position, padding, drawColor, 0, ShapeDrawer.LEFT_ALIGN); } // Reset the acceleration magnitude tracking value. accelerationTrack = new Vector2(0.0f, 0.0f); // Draw the heading. this.DrawHeading(); }
/// <summary> /// DrawDebug is drawn the entity if debug is true /// </summary> protected virtual void DrawDebug() { if (Debug) { DebugLine.DrawLines(); Vector2 position = new Vector2(10, 10); Padding padding = new Padding(0, GlobalManager.Pen.StringHeight("A")); StateManager.AddMessage(new Message("Object: [\"" + Tag + "\"]", position, padding, drawColor, 0, ShapeDrawer.LEFT_ALIGN), new Message("[\"" + Tag + "\"] Bounds: " + Bounds.ToString(), position, padding, drawColor, 0, ShapeDrawer.LEFT_ALIGN), new Message("[\"" + Tag + "\"] Position: " + new Point((int)(Position.X), (int)(Position.Y)) + "", position, padding, drawColor, 0, ShapeDrawer.LEFT_ALIGN)); } }