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

◆ DrawProj_TrueNightsEdge()

void Terraria.Main.DrawProj_TrueNightsEdge ( Projectile proj)
inlineprivate

Definition at line 32774 of file Main.cs.

32775 {
32776 //IL_0014: Unknown result type (might be due to invalid IL or missing references)
32777 //IL_0019: Unknown result type (might be due to invalid IL or missing references)
32778 //IL_001a: Unknown result type (might be due to invalid IL or missing references)
32779 //IL_001b: Unknown result type (might be due to invalid IL or missing references)
32780 //IL_0025: Unknown result type (might be due to invalid IL or missing references)
32781 //IL_002a: Unknown result type (might be due to invalid IL or missing references)
32782 //IL_004b: Unknown result type (might be due to invalid IL or missing references)
32783 //IL_0055: Unknown result type (might be due to invalid IL or missing references)
32784 //IL_005a: Unknown result type (might be due to invalid IL or missing references)
32785 //IL_005f: Unknown result type (might be due to invalid IL or missing references)
32786 //IL_0064: Unknown result type (might be due to invalid IL or missing references)
32787 //IL_0068: Unknown result type (might be due to invalid IL or missing references)
32788 //IL_006d: Unknown result type (might be due to invalid IL or missing references)
32789 //IL_00de: Unknown result type (might be due to invalid IL or missing references)
32790 //IL_00e8: Unknown result type (might be due to invalid IL or missing references)
32791 //IL_0107: Unknown result type (might be due to invalid IL or missing references)
32792 //IL_010c: Unknown result type (might be due to invalid IL or missing references)
32793 //IL_011c: Unknown result type (might be due to invalid IL or missing references)
32794 //IL_0122: Unknown result type (might be due to invalid IL or missing references)
32795 //IL_012c: Unknown result type (might be due to invalid IL or missing references)
32796 //IL_0133: Unknown result type (might be due to invalid IL or missing references)
32797 //IL_0138: Unknown result type (might be due to invalid IL or missing references)
32798 //IL_0167: Unknown result type (might be due to invalid IL or missing references)
32799 //IL_016c: Unknown result type (might be due to invalid IL or missing references)
32800 //IL_0171: Unknown result type (might be due to invalid IL or missing references)
32801 //IL_01ab: Unknown result type (might be due to invalid IL or missing references)
32802 //IL_01bb: Unknown result type (might be due to invalid IL or missing references)
32803 //IL_01c2: Unknown result type (might be due to invalid IL or missing references)
32804 //IL_01c7: Unknown result type (might be due to invalid IL or missing references)
32805 //IL_01d4: Unknown result type (might be due to invalid IL or missing references)
32806 //IL_01d6: Unknown result type (might be due to invalid IL or missing references)
32807 //IL_01dc: Unknown result type (might be due to invalid IL or missing references)
32808 //IL_01e0: Unknown result type (might be due to invalid IL or missing references)
32809 //IL_01e7: Unknown result type (might be due to invalid IL or missing references)
32810 //IL_0203: Unknown result type (might be due to invalid IL or missing references)
32811 //IL_0208: Unknown result type (might be due to invalid IL or missing references)
32812 //IL_021d: Unknown result type (might be due to invalid IL or missing references)
32813 //IL_022e: Unknown result type (might be due to invalid IL or missing references)
32814 //IL_0235: Unknown result type (might be due to invalid IL or missing references)
32815 //IL_023a: Unknown result type (might be due to invalid IL or missing references)
32816 //IL_023c: Unknown result type (might be due to invalid IL or missing references)
32817 //IL_0243: Unknown result type (might be due to invalid IL or missing references)
32818 //IL_024d: Unknown result type (might be due to invalid IL or missing references)
32819 //IL_0252: Unknown result type (might be due to invalid IL or missing references)
32820 //IL_026d: Unknown result type (might be due to invalid IL or missing references)
32821 //IL_0271: Unknown result type (might be due to invalid IL or missing references)
32822 //IL_027b: Unknown result type (might be due to invalid IL or missing references)
32823 //IL_0280: Unknown result type (might be due to invalid IL or missing references)
32824 //IL_05de: Unknown result type (might be due to invalid IL or missing references)
32825 //IL_05e3: Unknown result type (might be due to invalid IL or missing references)
32826 //IL_05e8: Unknown result type (might be due to invalid IL or missing references)
32827 //IL_0602: Unknown result type (might be due to invalid IL or missing references)
32828 //IL_061a: Unknown result type (might be due to invalid IL or missing references)
32829 //IL_0620: Unknown result type (might be due to invalid IL or missing references)
32830 //IL_0627: Unknown result type (might be due to invalid IL or missing references)
32831 //IL_062c: Unknown result type (might be due to invalid IL or missing references)
32832 //IL_0631: Unknown result type (might be due to invalid IL or missing references)
32833 //IL_0671: Unknown result type (might be due to invalid IL or missing references)
32834 //IL_0683: Unknown result type (might be due to invalid IL or missing references)
32835 //IL_068e: Unknown result type (might be due to invalid IL or missing references)
32836 //IL_0698: Unknown result type (might be due to invalid IL or missing references)
32837 //IL_069f: Unknown result type (might be due to invalid IL or missing references)
32838 //IL_06b0: Unknown result type (might be due to invalid IL or missing references)
32839 //IL_06b7: Unknown result type (might be due to invalid IL or missing references)
32840 //IL_06e5: Unknown result type (might be due to invalid IL or missing references)
32841 //IL_06ea: Unknown result type (might be due to invalid IL or missing references)
32842 //IL_02f9: Unknown result type (might be due to invalid IL or missing references)
32843 //IL_02fb: Unknown result type (might be due to invalid IL or missing references)
32844 //IL_0301: Unknown result type (might be due to invalid IL or missing references)
32845 //IL_0308: Unknown result type (might be due to invalid IL or missing references)
32846 //IL_030f: Unknown result type (might be due to invalid IL or missing references)
32847 //IL_0328: Unknown result type (might be due to invalid IL or missing references)
32848 //IL_032a: Unknown result type (might be due to invalid IL or missing references)
32849 //IL_0341: Unknown result type (might be due to invalid IL or missing references)
32850 //IL_0343: Unknown result type (might be due to invalid IL or missing references)
32851 //IL_0352: Unknown result type (might be due to invalid IL or missing references)
32852 //IL_0362: Unknown result type (might be due to invalid IL or missing references)
32853 //IL_0369: Unknown result type (might be due to invalid IL or missing references)
32854 //IL_0370: Unknown result type (might be due to invalid IL or missing references)
32855 //IL_0377: Unknown result type (might be due to invalid IL or missing references)
32856 //IL_037e: Unknown result type (might be due to invalid IL or missing references)
32857 //IL_0388: Unknown result type (might be due to invalid IL or missing references)
32858 //IL_0390: Unknown result type (might be due to invalid IL or missing references)
32859 //IL_03a7: Unknown result type (might be due to invalid IL or missing references)
32860 //IL_03a9: Unknown result type (might be due to invalid IL or missing references)
32861 //IL_03af: Unknown result type (might be due to invalid IL or missing references)
32862 //IL_03b3: Unknown result type (might be due to invalid IL or missing references)
32863 //IL_03ba: Unknown result type (might be due to invalid IL or missing references)
32864 //IL_03d0: Unknown result type (might be due to invalid IL or missing references)
32865 //IL_03d7: Unknown result type (might be due to invalid IL or missing references)
32866 //IL_03e1: Unknown result type (might be due to invalid IL or missing references)
32867 //IL_03e6: Unknown result type (might be due to invalid IL or missing references)
32868 //IL_03fd: Unknown result type (might be due to invalid IL or missing references)
32869 //IL_0406: Unknown result type (might be due to invalid IL or missing references)
32870 //IL_0410: Unknown result type (might be due to invalid IL or missing references)
32871 //IL_0426: Unknown result type (might be due to invalid IL or missing references)
32872 //IL_042d: Unknown result type (might be due to invalid IL or missing references)
32873 //IL_0434: Unknown result type (might be due to invalid IL or missing references)
32874 //IL_043e: Unknown result type (might be due to invalid IL or missing references)
32875 //IL_0440: Unknown result type (might be due to invalid IL or missing references)
32876 //IL_0470: Unknown result type (might be due to invalid IL or missing references)
32877 //IL_0472: Unknown result type (might be due to invalid IL or missing references)
32878 //IL_0478: Unknown result type (might be due to invalid IL or missing references)
32879 //IL_047f: Unknown result type (might be due to invalid IL or missing references)
32880 //IL_0495: Unknown result type (might be due to invalid IL or missing references)
32881 //IL_0497: Unknown result type (might be due to invalid IL or missing references)
32882 //IL_04ae: Unknown result type (might be due to invalid IL or missing references)
32883 //IL_04b0: Unknown result type (might be due to invalid IL or missing references)
32884 //IL_04bf: Unknown result type (might be due to invalid IL or missing references)
32885 //IL_04cf: Unknown result type (might be due to invalid IL or missing references)
32886 //IL_04d6: Unknown result type (might be due to invalid IL or missing references)
32887 //IL_04dd: Unknown result type (might be due to invalid IL or missing references)
32888 //IL_04e4: Unknown result type (might be due to invalid IL or missing references)
32889 //IL_04eb: Unknown result type (might be due to invalid IL or missing references)
32890 //IL_04f3: Unknown result type (might be due to invalid IL or missing references)
32891 //IL_050a: Unknown result type (might be due to invalid IL or missing references)
32892 //IL_050c: Unknown result type (might be due to invalid IL or missing references)
32893 //IL_0512: Unknown result type (might be due to invalid IL or missing references)
32894 //IL_0516: Unknown result type (might be due to invalid IL or missing references)
32895 //IL_051d: Unknown result type (might be due to invalid IL or missing references)
32896 //IL_0533: Unknown result type (might be due to invalid IL or missing references)
32897 //IL_053a: Unknown result type (might be due to invalid IL or missing references)
32898 //IL_053f: Unknown result type (might be due to invalid IL or missing references)
32899 //IL_0556: Unknown result type (might be due to invalid IL or missing references)
32900 //IL_055f: Unknown result type (might be due to invalid IL or missing references)
32901 //IL_0569: Unknown result type (might be due to invalid IL or missing references)
32902 //IL_057f: Unknown result type (might be due to invalid IL or missing references)
32903 //IL_0586: Unknown result type (might be due to invalid IL or missing references)
32904 //IL_058d: Unknown result type (might be due to invalid IL or missing references)
32905 //IL_058f: Unknown result type (might be due to invalid IL or missing references)
32907 Rectangle rectangle = asset.Frame(1, 4);
32908 Vector2 origin = rectangle.Size() / 2f;
32909 float num = proj.scale * 1.1f;
32910 SpriteEffects effects = (SpriteEffects)((!(proj.ai[0] >= 0f)) ? 2 : 0);
32911 float num6 = 0.975f;
32912 Color color5 = Lighting.GetColor(proj.Center.ToTileCoordinates());
32913 Vector3 val = ((Color)(ref color5)).ToVector3();
32914 float fromValue = ((Vector3)(ref val)).Length() / (float)Math.Sqrt(3.0);
32915 fromValue = Utils.Remap(fromValue, 0.2f, 1f, 0f, 1f);
32916 float num7 = MathHelper.Min(0.15f + fromValue * 0.85f, Utils.Remap(proj.localAI[0], 30f, 96f, 1f, 0f));
32917 _ = proj.Size / 2f;
32918 float num8 = 2f;
32919 for (float num9 = num8; num9 >= 0f; num9 -= 1f)
32920 {
32921 if (!(proj.oldPos[(int)num9] == Vector2.Zero))
32922 {
32923 Vector2 val2 = proj.Center - proj.velocity * 0.5f * num9;
32924 float num10 = proj.oldRot[(int)num9] + proj.ai[0] * ((float)Math.PI * 2f) * 0.1f * (0f - num9);
32925 Vector2 position = val2 - screenPosition;
32926 float num11 = 1f - num9 / num8;
32927 float num12 = proj.Opacity * num11 * num11 * 0.85f;
32928 float amount = proj.Opacity * proj.Opacity;
32929 Color color = Color.Lerp(new Color(40, 20, 60, 120), new Color(80, 160, 50, 120), amount);
32930 spriteBatch.Draw(asset.Value, position, (Rectangle?)rectangle, color * num7 * num12, num10 + proj.ai[0] * ((float)Math.PI / 4f) * -1f, origin, num * num6, effects, 0f);
32931 Color color2 = Color.Lerp(new Color(80, 40, 180), new Color(155, 255, 100), amount);
32932 Color color3 = Color.White * num12 * 0.5f;
32933 ((Color)(ref color3)).A = (byte)((float)(int)((Color)(ref color3)).A * (1f - num7));
32934 Color color4 = color3 * num7 * 0.5f;
32935 ((Color)(ref color4)).G = (byte)((float)(int)((Color)(ref color4)).G * num7);
32936 ((Color)(ref color4)).R = (byte)((float)(int)((Color)(ref color4)).R * (0.25f + num7 * 0.75f));
32937 float num13 = 3f;
32938 for (float num2 = (float)Math.PI * -2f + (float)Math.PI * 2f / num13; num2 < 0f; num2 += (float)Math.PI * 2f / num13)
32939 {
32940 float num3 = Utils.Remap(num2, (float)Math.PI * -2f, 0f, 0f, 0.5f);
32941 spriteBatch.Draw(asset.Value, position, (Rectangle?)rectangle, color4 * 0.15f * num3, num10 + proj.ai[0] * 0.01f + num2, origin, num, effects, 0f);
32942 spriteBatch.Draw(asset.Value, position, (Rectangle?)rectangle, Color.Lerp(new Color(80, 30, 160), new Color(200, 255, 0), amount) * fromValue * num12 * num3, num10 + num2, origin, num * 0.8f, effects, 0f);
32943 spriteBatch.Draw(asset.Value, position, (Rectangle?)rectangle, color2 * fromValue * num12 * MathHelper.Lerp(0.05f, 0.4f, fromValue) * num3, num10 + num2, origin, num * num6, effects, 0f);
32944 spriteBatch.Draw(asset.Value, position, (Rectangle?)asset.Frame(1, 4, 0, 3), Color.White * MathHelper.Lerp(0.05f, 0.5f, fromValue) * num12 * num3, num10 + num2, origin, num, effects, 0f);
32945 }
32946 spriteBatch.Draw(asset.Value, position, (Rectangle?)rectangle, color4 * 0.15f, num10 + proj.ai[0] * 0.01f, origin, num, effects, 0f);
32947 spriteBatch.Draw(asset.Value, position, (Rectangle?)rectangle, Color.Lerp(new Color(80, 30, 160), new Color(200, 255, 0), amount) * num7 * num12, num10, origin, num * 0.8f, effects, 0f);
32948 spriteBatch.Draw(asset.Value, position, (Rectangle?)rectangle, color2 * fromValue * num12 * MathHelper.Lerp(0.05f, 0.4f, num7), num10, origin, num * num6, effects, 0f);
32949 spriteBatch.Draw(asset.Value, position, (Rectangle?)asset.Frame(1, 4, 0, 3), Color.White * MathHelper.Lerp(0.05f, 0.5f, num7) * num12, num10, origin, num, effects, 0f);
32950 }
32951 }
32952 float num4 = 1f - proj.localAI[0] * 1f / 80f;
32953 if (num4 < 0.5f)
32954 {
32955 num4 = 0.5f;
32956 }
32957 Vector2 drawpos = proj.Center - screenPosition + (proj.rotation + 0.47123894f * proj.ai[0]).ToRotationVector2() * ((float)asset.Width() * 0.5f - 4f) * num * num4;
32958 float num5 = MathHelper.Min(num7, MathHelper.Lerp(1f, fromValue, Utils.Remap(proj.localAI[0], 0f, 80f, 0f, 1f)));
32959 DrawPrettyStarSparkle(proj.Opacity, (SpriteEffects)0, drawpos, new Color(255, 255, 255, 0) * proj.Opacity * 0.5f * num5, new Color(150, 255, 100) * num5, proj.Opacity, 0f, 1f, 1f, 2f, (float)Math.PI / 4f, new Vector2(2f, 2f), Vector2.One);
32960 }
static Asset< Texture2D >[] Projectile
static SpriteBatch spriteBatch
Definition Main.cs:1043
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 void DrawPrettyStarSparkle(float opacity, SpriteEffects dir, Vector2 drawpos, Color drawColor, Color shineColor, float flareCounter, float fadeInStart, float fadeInEnd, float fadeOutStart, float fadeOutEnd, float rotation, Vector2 scale, Vector2 fatness)
Definition Main.cs:45246

References Terraria.Graphics.Light.Color, Terraria.Main.DrawPrettyStarSparkle(), Terraria.Lighting.GetColor(), Terraria.GameContent.TextureAssets.Projectile, Terraria.Utils.Remap(), Terraria.Main.screenPosition, and Terraria.Main.spriteBatch.

Referenced by Terraria.Main.DrawProj_DrawSpecialProjs().

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