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

◆ DrawLine() [2/3]

static void Terraria.Utils.DrawLine ( SpriteBatch spriteBatch,
Vector2 start,
Vector2 end,
Color color )
inlinestatic

Definition at line 2790 of file Utils.cs.

2791 {
2792 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
2793 //IL_0001: Unknown result type (might be due to invalid IL or missing references)
2794 //IL_0008: Unknown result type (might be due to invalid IL or missing references)
2795 //IL_0009: Unknown result type (might be due to invalid IL or missing references)
2796 //IL_000a: Unknown result type (might be due to invalid IL or missing references)
2797 //IL_0010: Unknown result type (might be due to invalid IL or missing references)
2798 //IL_0015: Unknown result type (might be due to invalid IL or missing references)
2799 //IL_0016: Unknown result type (might be due to invalid IL or missing references)
2800 //IL_0017: Unknown result type (might be due to invalid IL or missing references)
2801 //IL_0018: Unknown result type (might be due to invalid IL or missing references)
2802 //IL_001d: Unknown result type (might be due to invalid IL or missing references)
2803 //IL_001e: Unknown result type (might be due to invalid IL or missing references)
2804 //IL_0040: Unknown result type (might be due to invalid IL or missing references)
2805 //IL_0041: Unknown result type (might be due to invalid IL or missing references)
2806 //IL_0042: Unknown result type (might be due to invalid IL or missing references)
2807 //IL_005c: Unknown result type (might be due to invalid IL or missing references)
2808 //IL_0063: Unknown result type (might be due to invalid IL or missing references)
2809 //IL_0068: Unknown result type (might be due to invalid IL or missing references)
2810 //IL_006d: Unknown result type (might be due to invalid IL or missing references)
2811 //IL_0074: Unknown result type (might be due to invalid IL or missing references)
2812 //IL_0089: Unknown result type (might be due to invalid IL or missing references)
2813 //IL_008c: Unknown result type (might be due to invalid IL or missing references)
2814 //IL_008d: Unknown result type (might be due to invalid IL or missing references)
2815 //IL_0092: Unknown result type (might be due to invalid IL or missing references)
2816 //IL_0097: Unknown result type (might be due to invalid IL or missing references)
2817 float num = Vector2.Distance(start, end);
2818 Vector2 vector = (end - start) / num;
2819 Vector2 vector2 = start;
2820 Vector2 screenPosition = Main.screenPosition;
2821 float rotation = vector.ToRotation();
2822 for (float num2 = 0f; num2 <= num; num2 += 4f)
2823 {
2824 float num3 = num2 / num;
2825 spriteBatch.Draw(TextureAssets.BlackTile.Value, vector2 - screenPosition, (Rectangle?)null, new Color(new Vector4(num3, num3, num3, 1f) * ((Color)(ref color)).ToVector4()), rotation, Vector2.Zero, 0.25f, (SpriteEffects)0, 0f);
2826 vector2 = start + num2 * vector;
2827 }
2828 }
static Asset< Texture2D > BlackTile

References Terraria.GameContent.TextureAssets.BlackTile, and Terraria.Main.screenPosition.