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

◆ DrawInterface_3_LaserRuler()

static void Terraria.Main.DrawInterface_3_LaserRuler ( )
inlinestaticprivate

Definition at line 59907 of file Main.cs.

59908 {
59909 //IL_0048: Unknown result type (might be due to invalid IL or missing references)
59910 //IL_005e: Unknown result type (might be due to invalid IL or missing references)
59911 //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
59912 //IL_00aa: Unknown result type (might be due to invalid IL or missing references)
59913 //IL_00ac: Unknown result type (might be due to invalid IL or missing references)
59914 //IL_00b3: Unknown result type (might be due to invalid IL or missing references)
59915 //IL_00b8: Unknown result type (might be due to invalid IL or missing references)
59916 //IL_00bd: Unknown result type (might be due to invalid IL or missing references)
59917 //IL_00bf: Unknown result type (might be due to invalid IL or missing references)
59918 //IL_00c1: Unknown result type (might be due to invalid IL or missing references)
59919 //IL_00c6: Unknown result type (might be due to invalid IL or missing references)
59920 //IL_00d0: Unknown result type (might be due to invalid IL or missing references)
59921 //IL_00d5: Unknown result type (might be due to invalid IL or missing references)
59922 //IL_00f1: Unknown result type (might be due to invalid IL or missing references)
59923 //IL_00f6: Unknown result type (might be due to invalid IL or missing references)
59924 //IL_00fb: Unknown result type (might be due to invalid IL or missing references)
59925 //IL_0106: Unknown result type (might be due to invalid IL or missing references)
59926 //IL_011c: Unknown result type (might be due to invalid IL or missing references)
59927 //IL_013d: Unknown result type (might be due to invalid IL or missing references)
59928 //IL_0147: Unknown result type (might be due to invalid IL or missing references)
59929 //IL_014d: Unknown result type (might be due to invalid IL or missing references)
59930 //IL_0152: Unknown result type (might be due to invalid IL or missing references)
59931 //IL_0168: Unknown result type (might be due to invalid IL or missing references)
59932 //IL_0172: Unknown result type (might be due to invalid IL or missing references)
59933 //IL_0178: Unknown result type (might be due to invalid IL or missing references)
59934 //IL_017d: Unknown result type (might be due to invalid IL or missing references)
59935 //IL_018d: Unknown result type (might be due to invalid IL or missing references)
59936 //IL_018f: Unknown result type (might be due to invalid IL or missing references)
59937 //IL_0194: Unknown result type (might be due to invalid IL or missing references)
59938 //IL_0199: Unknown result type (might be due to invalid IL or missing references)
59939 //IL_01ab: Unknown result type (might be due to invalid IL or missing references)
59940 //IL_01ad: Unknown result type (might be due to invalid IL or missing references)
59941 //IL_01af: Unknown result type (might be due to invalid IL or missing references)
59942 //IL_01b4: Unknown result type (might be due to invalid IL or missing references)
59943 //IL_01b8: Unknown result type (might be due to invalid IL or missing references)
59944 //IL_02e2: Unknown result type (might be due to invalid IL or missing references)
59945 //IL_01c6: Unknown result type (might be due to invalid IL or missing references)
59946 //IL_035d: Unknown result type (might be due to invalid IL or missing references)
59947 //IL_0365: Unknown result type (might be due to invalid IL or missing references)
59948 //IL_036f: Unknown result type (might be due to invalid IL or missing references)
59949 //IL_0374: Unknown result type (might be due to invalid IL or missing references)
59950 //IL_0379: Unknown result type (might be due to invalid IL or missing references)
59951 //IL_037e: Unknown result type (might be due to invalid IL or missing references)
59952 //IL_0380: Unknown result type (might be due to invalid IL or missing references)
59953 //IL_038a: Unknown result type (might be due to invalid IL or missing references)
59954 //IL_038f: Unknown result type (might be due to invalid IL or missing references)
59955 //IL_0396: Unknown result type (might be due to invalid IL or missing references)
59956 //IL_039d: Unknown result type (might be due to invalid IL or missing references)
59957 //IL_02f4: Unknown result type (might be due to invalid IL or missing references)
59958 //IL_02fc: Unknown result type (might be due to invalid IL or missing references)
59959 //IL_0306: Unknown result type (might be due to invalid IL or missing references)
59960 //IL_030b: Unknown result type (might be due to invalid IL or missing references)
59961 //IL_0310: Unknown result type (might be due to invalid IL or missing references)
59962 //IL_0315: Unknown result type (might be due to invalid IL or missing references)
59963 //IL_0317: Unknown result type (might be due to invalid IL or missing references)
59964 //IL_0321: Unknown result type (might be due to invalid IL or missing references)
59965 //IL_032c: Unknown result type (might be due to invalid IL or missing references)
59966 //IL_0336: Unknown result type (might be due to invalid IL or missing references)
59967 //IL_033d: Unknown result type (might be due to invalid IL or missing references)
59968 //IL_01d4: Unknown result type (might be due to invalid IL or missing references)
59969 //IL_03d5: Unknown result type (might be due to invalid IL or missing references)
59970 //IL_03e4: Unknown result type (might be due to invalid IL or missing references)
59971 //IL_03ef: Unknown result type (might be due to invalid IL or missing references)
59972 //IL_03f9: Unknown result type (might be due to invalid IL or missing references)
59973 //IL_03fe: Unknown result type (might be due to invalid IL or missing references)
59974 //IL_0403: Unknown result type (might be due to invalid IL or missing references)
59975 //IL_0408: Unknown result type (might be due to invalid IL or missing references)
59976 //IL_040a: Unknown result type (might be due to invalid IL or missing references)
59977 //IL_0414: Unknown result type (might be due to invalid IL or missing references)
59978 //IL_0419: Unknown result type (might be due to invalid IL or missing references)
59979 //IL_0420: Unknown result type (might be due to invalid IL or missing references)
59980 //IL_0427: Unknown result type (might be due to invalid IL or missing references)
59981 //IL_0211: Unknown result type (might be due to invalid IL or missing references)
59982 //IL_0259: Unknown result type (might be due to invalid IL or missing references)
59983 //IL_0263: Unknown result type (might be due to invalid IL or missing references)
59984 //IL_0268: Unknown result type (might be due to invalid IL or missing references)
59985 //IL_026d: Unknown result type (might be due to invalid IL or missing references)
59986 //IL_0272: Unknown result type (might be due to invalid IL or missing references)
59987 //IL_0274: Unknown result type (might be due to invalid IL or missing references)
59988 //IL_0279: Unknown result type (might be due to invalid IL or missing references)
59989 //IL_027b: Unknown result type (might be due to invalid IL or missing references)
59990 //IL_0285: Unknown result type (might be due to invalid IL or missing references)
59991 //IL_028a: Unknown result type (might be due to invalid IL or missing references)
59992 //IL_0291: Unknown result type (might be due to invalid IL or missing references)
59993 //IL_0298: Unknown result type (might be due to invalid IL or missing references)
59994 if (!player[myPlayer].rulerGrid || player[myPlayer].builderAccStatus[1] != 0)
59995 {
59996 return;
59997 }
59998 float num = ((Vector2)(ref player[myPlayer].velocity)).Length();
59999 num = Vector2.Distance(player[myPlayer].position, player[myPlayer].shadowPos[2]);
60000 float num2 = 6f;
60001 Texture2D value = TextureAssets.Extra[68].Value;
60002 float num3 = MathHelper.Lerp(0.2f, 0.7f, MathHelper.Clamp(1f - num / num2, 0f, 1f));
60003 Vector2 vec = screenPosition;
60004 vec += new Vector2(-50f);
60005 vec = vec.ToTileCoordinates().ToVector2() * 16f;
60006 int num4 = (screenWidth + 100) / 16;
60007 int num5 = (screenHeight + 100) / 16;
60008 Point point = MouseWorld.ToTileCoordinates();
60009 point.X -= (int)vec.X / 16;
60010 point.Y -= (int)vec.Y / 16;
60011 Color color = new Color(0.24f, 0.8f, 0.9f, 0.5f) * 0.4f * num3;
60012 Color color2 = new Color(1f, 0.8f, 0.9f, 0.5f) * 0.5f * num3;
60013 Rectangle value2 = default(Rectangle);
60014 ((Rectangle)(ref value2))._002Ector(0, 18, 18, 18);
60015 vec -= Vector2.One;
60016 for (int i = 0; i < num4; i++)
60017 {
60018 for (int j = 0; j < num5; j++)
60019 {
60020 Color color3 = color;
60021 Vector2 zero = Vector2.Zero;
60022 if (i != point.X && j != point.Y)
60023 {
60024 if (i != point.X + 1)
60025 {
60026 value2.X = 0;
60027 value2.Width = 16;
60028 }
60029 else
60030 {
60031 value2.X = 2;
60032 value2.Width = 14;
60033 zero.X = 2f;
60034 }
60035 if (j != point.Y + 1)
60036 {
60037 value2.Y = 18;
60038 value2.Height = 16;
60039 }
60040 else
60041 {
60042 value2.Y = 2;
60043 value2.Height = 14;
60044 zero.Y = 2f;
60045 }
60046 spriteBatch.Draw(value, ReverseGravitySupport(new Vector2((float)i, (float)j) * 16f - screenPosition + vec + zero, 16f), (Rectangle?)value2, color3, 0f, Vector2.Zero, 1f, (SpriteEffects)0, 0f);
60047 }
60048 }
60049 }
60050 ((Rectangle)(ref value2))._002Ector(0, 0, 16, 18);
60051 for (int k = 0; k < num4; k++)
60052 {
60053 if (k == point.X)
60054 {
60055 spriteBatch.Draw(value, ReverseGravitySupport(new Vector2((float)k, (float)point.Y) * 16f - screenPosition + vec, 16f), (Rectangle?)new Rectangle(0, 0, 16, 16), color2, 0f, Vector2.Zero, 1f, (SpriteEffects)0, 0f);
60056 }
60057 else
60058 {
60059 spriteBatch.Draw(value, ReverseGravitySupport(new Vector2((float)k, (float)point.Y) * 16f - screenPosition + vec, 16f), (Rectangle?)value2, color2, 0f, Vector2.Zero, 1f, (SpriteEffects)0, 0f);
60060 }
60061 }
60062 ((Rectangle)(ref value2))._002Ector(0, 0, 18, 16);
60063 for (int l = 0; l < num5; l++)
60064 {
60065 if (l != point.Y)
60066 {
60067 spriteBatch.Draw(value, ReverseGravitySupport(new Vector2((float)point.X, (float)l) * 16f - screenPosition + vec, 16f), (Rectangle?)value2, color2, 0f, Vector2.Zero, 1f, (SpriteEffects)0, 0f);
60068 }
60069 }
60070 }
static Asset< Texture2D >[] Extra
static SpriteBatch spriteBatch
Definition Main.cs:1043
static int myPlayer
The index in F:Terraria.Main.player of this client's Player. If this is 255, this client is the ser...
Definition Main.cs:1958
static Vector2 ReverseGravitySupport(Vector2 pos, float height=0f)
Definition Main.cs:3198
static Vector2 MouseWorld
Fetches the position of the mouse cursor in the world. Useful for making things functionally happen ...
Definition Main.cs:2945
static int screenHeight
Definition Main.cs:1870
static Vector2 screenPosition
The position of the top left corner of the screen in world coordinates. Modify in M:Terraria....
Definition Main.cs:1864
static int screenWidth
Definition Main.cs:1868
static Player[] player
Definition Main.cs:1960

References Terraria.Graphics.Light.Color, Terraria.GameContent.TextureAssets.Extra, Terraria.Main.MouseWorld, Terraria.Main.myPlayer, Terraria.Main.player, Terraria.Main.ReverseGravitySupport(), Terraria.Main.screenHeight, Terraria.Main.screenPosition, Terraria.Main.screenWidth, and Terraria.Main.spriteBatch.

Referenced by Terraria.Main.SetupDrawInterfaceLayers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: