Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DrawLine()

void ReLogic.Graphics.BasicDebugDrawer.DrawLine ( Vector2 start,
Vector2 end,
float width,
Color color )
inline

Definition at line 78 of file BasicDebugDrawer.cs.

79 {
80 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
81 //IL_0001: Unknown result type (might be due to invalid IL or missing references)
82 //IL_0002: Unknown result type (might be due to invalid IL or missing references)
83 //IL_0007: Unknown result type (might be due to invalid IL or missing references)
84 //IL_0008: Unknown result type (might be due to invalid IL or missing references)
85 //IL_000f: Unknown result type (might be due to invalid IL or missing references)
86 //IL_0038: Unknown result type (might be due to invalid IL or missing references)
87 //IL_0042: Unknown result type (might be due to invalid IL or missing references)
88 //IL_004f: Unknown result type (might be due to invalid IL or missing references)
89 //IL_0054: Unknown result type (might be due to invalid IL or missing references)
90 //IL_005a: Unknown result type (might be due to invalid IL or missing references)
91 Vector2 vector = end - start;
92 float rotation = (float)Math.Atan2(vector.Y, vector.X);
93 Vector2 vector2 = default(Vector2);
94 ((Vector2)(ref vector2))._002Ector(((Vector2)(ref vector)).Length(), width);
95 _spriteBatch.Draw(_texture, start, (Rectangle?)null, color, rotation, new Vector2(0f, 2f), vector2 / 4f, (SpriteEffects)0, 1f);
96 }
void Draw(Texture2D texture, Vector2 position, Color color)
static double Atan2(double y, double x)

References ReLogic.Graphics.BasicDebugDrawer._spriteBatch, ReLogic.Graphics.BasicDebugDrawer._texture, System.Math.Atan2(), Microsoft.Xna.Framework.Graphics.SpriteBatch.Draw(), System.start, Microsoft.Xna.Framework.Graphics.Vector2, Microsoft.Xna.Framework.Vector2.X, and Microsoft.Xna.Framework.Vector2.Y.