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

◆ GetLastPrismHue()

float Terraria.Projectile.GetLastPrismHue ( float laserIndex,
ref float laserLuminance,
ref float laserAlphaMultiplier )
inline

Definition at line 20764 of file Projectile.cs.

20765 {
20766 //IL_0724: Unknown result type (might be due to invalid IL or missing references)
20767 //IL_0729: Unknown result type (might be due to invalid IL or missing references)
20768 //IL_072f: Unknown result type (might be due to invalid IL or missing references)
20769 //IL_0734: Unknown result type (might be due to invalid IL or missing references)
20770 //IL_0a90: Unknown result type (might be due to invalid IL or missing references)
20771 //IL_0aa4: Unknown result type (might be due to invalid IL or missing references)
20772 //IL_0aab: Unknown result type (might be due to invalid IL or missing references)
20773 //IL_0ab0: Unknown result type (might be due to invalid IL or missing references)
20774 if (Main.player[owner].active)
20775 {
20776 double timeForVisualEffects = Main.timeForVisualEffects;
20777 switch (Main.player[owner].name)
20778 {
20779 case "Cenx":
20780 {
20781 float amount2 = Utils.PingPongFrom01To010(laserIndex / 6f);
20782 amount2 = MathHelper.SmoothStep(0f, 1f, amount2);
20783 amount2 = MathHelper.SmoothStep(0f, 1f, amount2);
20784 return Main.rgbToHsl(Color.Lerp(new Color(0.3f, 1f, 0.2f), Color.HotPink, amount2)).X;
20785 }
20786 case "Crowno":
20787 laserLuminance = MathHelper.Lerp(0.25f, 0.4f, Utils.GetLerpValue(-1f, 1f, (float)Math.Cos(timeForVisualEffects / 105.0 * 6.2831854820251465)));
20788 laserAlphaMultiplier = 0.5f;
20789 return MathHelper.Lerp(127f / 180f, 47f / 60f, Utils.Turn01ToCyclic010(laserIndex / 6f));
20790 case "Tsuki":
20791 case "Yoraiz0r":
20792 return 0.92f;
20793 case "Lazure":
20794 return MathHelper.Lerp(8f / 15f, 83f / 90f, Utils.Turn01ToCyclic010(laserIndex / 6f));
20795 case "Jaxrud":
20796 return MathHelper.Lerp(13f / 72f, 0.43611112f, Utils.Turn01ToCyclic010(laserIndex / 6f));
20797 case "Ghostar":
20798 laserLuminance = MathHelper.Lerp(0.4f, 0.7f, Utils.GetLerpValue(-1f, 1f, (float)Math.Cos(timeForVisualEffects / 120.0 * 6.2831854820251465)));
20799 laserAlphaMultiplier = 0.3f;
20800 return 0.66f;
20801 case "Devalaous":
20802 return 0.66f + (float)Math.Cos(timeForVisualEffects / 180.0 * 6.2831854820251465) * 0.1f;
20803 case "Leinfors":
20804 return 0.73f + (float)Math.Cos(timeForVisualEffects / 3.0 * 6.2831854820251465) * 0.03f;
20805 case "Aeroblop":
20806 return 0.25f + (float)Math.Cos(timeForVisualEffects / 180.0 * 6.2831854820251465) * 0.1f;
20807 case "Doylee":
20808 return 0.84f + (float)Math.Cos(timeForVisualEffects / 90.0 * 6.2831854820251465) * 0.16f;
20809 case "Darkhalis":
20810 case "Arkhalis":
20811 return 0.75f + (float)Math.Cos(timeForVisualEffects / 180.0 * 6.2831854820251465) * 0.07f;
20812 case "Nike Leon":
20813 return 0.07f + (float)Math.Cos(timeForVisualEffects / 180.0 * 6.2831854820251465) * 0.04f;
20814 case "Suweeka":
20815 return 0.5f + (float)Math.Cos(timeForVisualEffects / 180.0 * 6.2831854820251465) * 0.18f;
20816 case "W1K":
20817 return 0.75f + (float)Math.Cos(timeForVisualEffects / 120.0 * 6.2831854820251465) * 0.05f;
20818 case "Grox The Great":
20819 return 0.41f + (float)Math.Cos(timeForVisualEffects / 120.0 * 6.2831854820251465) * 0.1f;
20820 case "Acamaeda":
20821 return 0.18f + (float)Math.Cos(timeForVisualEffects / 90.0 * 6.2831854820251465) * 0.1f;
20822 case "Alchemystics":
20823 return 0.73f + (float)Math.Cos(timeForVisualEffects / 180.0 * 6.2831854820251465) * 0.18f;
20824 case "Antithesis":
20825 laserLuminance = 0.25f;
20826 laserAlphaMultiplier = 0.4f;
20827 return 0.7f + (float)Math.Cos(timeForVisualEffects / 180.0 * 6.2831854820251465) * 0.05f;
20828 case "Aurora3500":
20829 laserLuminance = MathHelper.Lerp(0f, 0.5f, Utils.GetLerpValue(-1f, 1f, (float)Math.Cos(timeForVisualEffects / 105.0 * 6.2831854820251465)));
20830 laserAlphaMultiplier = 0.25f;
20831 return 0.35f;
20832 case "Bame":
20833 {
20834 float amount = Utils.PingPongFrom01To010(laserIndex / 6f);
20835 amount = MathHelper.SmoothStep(0f, 1f, amount);
20836 amount = MathHelper.SmoothStep(0f, 1f, amount);
20837 return Main.rgbToHsl(Color.Lerp(Color.Yellow, new Color(0.2f, 0f, 0.7f), amount)).X;
20838 }
20839 case "Criddle":
20840 return 0.91f + (float)Math.Cos(timeForVisualEffects / 180.0 * 6.2831854820251465) * 0.19f;
20841 case "Darthkitten":
20842 laserLuminance = MathHelper.Lerp(0.4f, 0.9f, Utils.GetLerpValue(-1f, 1f, (float)Math.Cos(timeForVisualEffects / 120.0 * 6.2831854820251465)));
20843 laserAlphaMultiplier = 0.3f;
20844 return 1f;
20845 case "darthmorf":
20846 laserLuminance = MathHelper.Lerp(0f, 0.2f, Utils.GetLerpValue(-1f, 1f, (float)Math.Cos(timeForVisualEffects / 105.0 * 6.2831854820251465)));
20847 laserAlphaMultiplier = 0.4f;
20848 return 0f;
20849 case "Discipile":
20850 laserLuminance = MathHelper.Lerp(0f, 0.4f, Utils.GetLerpValue(-1f, 1f, (float)Math.Cos(timeForVisualEffects / 105.0 * 6.2831854820251465)));
20851 laserAlphaMultiplier = 0.35f;
20852 return 0.55f;
20853 case "Jenosis":
20854 return 0.66f + (float)Math.Cos(timeForVisualEffects / 180.0 * 6.2831854820251465) * 0.08f;
20855 case "Kazzymodus":
20856 laserLuminance = MathHelper.Lerp(0.6f, 0.8f, Utils.GetLerpValue(-1f, 1f, (float)Math.Cos(timeForVisualEffects / 90.0 * 6.2831854820251465)));
20857 laserAlphaMultiplier = 0.3f;
20858 return 0.33f;
20859 case "Khaios":
20860 laserLuminance = MathHelper.Lerp(0f, 0.1f, Utils.GetLerpValue(-1f, 1f, (float)Math.Cos(timeForVisualEffects / 105.0 * 6.2831854820251465)));
20861 laserAlphaMultiplier = 0.25f;
20862 return 0.35f;
20863 case "Loki":
20864 laserLuminance = MathHelper.Lerp(0f, 0.3f, Utils.GetLerpValue(-1f, 1f, (float)Math.Cos(timeForVisualEffects / 5.0 * 6.2831854820251465)));
20865 laserAlphaMultiplier = 0.4f;
20866 return 0f;
20867 case "ManaUser":
20868 return 0.49f + (float)Math.Cos(timeForVisualEffects / 140.0 * 6.2831854820251465) * 0.08f;
20869 case "Mid":
20870 laserLuminance = 0.25f;
20871 laserAlphaMultiplier = 0.4f;
20872 return 0.86f + (float)Math.Cos(timeForVisualEffects / 270.0 * 6.2831854820251465) * 0.13f;
20873 case "Nimbus":
20874 laserLuminance = MathHelper.Lerp(0f, 0.3f, Utils.GetLerpValue(-1f, 1f, (float)Math.Cos(timeForVisualEffects / 20.0 * 6.2831854820251465)));
20875 laserAlphaMultiplier = 0.2f;
20876 return 0.75f;
20877 case "ppowersteef":
20878 laserLuminance = MathHelper.Lerp(0.1f, 0.5f, Utils.GetLerpValue(-1f, 1f, (float)Math.Cos(timeForVisualEffects / 105.0 * 6.2831854820251465)));
20879 laserAlphaMultiplier = 0.25f;
20880 return 0.6f;
20881 case "RBrandon":
20882 laserLuminance = MathHelper.Lerp(0f, 0.5f, Utils.GetLerpValue(-1f, 1f, (float)Math.Cos(timeForVisualEffects / 105.0 * 6.2831854820251465)));
20883 laserAlphaMultiplier = 0.4f;
20884 return 1f;
20885 case "Redigit":
20886 return 0.7f;
20887 case "Serenity":
20888 laserLuminance = MathHelper.Lerp(0.9f, 0.65f, Utils.GetLerpValue(-1f, 1f, (float)Math.Cos(timeForVisualEffects / 120.0 * 6.2831854820251465)));
20889 laserAlphaMultiplier = 0.3f;
20890 return 0.85f;
20891 case "Sigma":
20892 return 0.06f + (float)Math.Cos(timeForVisualEffects / 180.0 * 6.2831854820251465) * 0.06f;
20893 case "teiull":
20894 return 0.5f + (float)Math.Cos(timeForVisualEffects / 45.0 * 6.2831854820251465) * 0.3f;
20895 case "Unit One":
20896 return 0.38f + (float)Math.Cos(timeForVisualEffects / 90.0 * 6.2831854820251465) * 0.24f;
20897 case "Vulpes Inculta":
20898 return 0.7f + (float)Math.Cos(timeForVisualEffects / 180.0 * 6.2831854820251465) * 0.05f;
20899 case "Waze3174":
20900 return 0.38f + (float)Math.Cos(timeForVisualEffects / 90.0 * 6.2831854820251465) * 0.24f;
20901 case "Xman101":
20902 laserLuminance = MathHelper.Lerp(0.9f, 0.55f, Utils.GetLerpValue(-1f, 1f, (float)Math.Cos(timeForVisualEffects / 120.0 * 6.2831854820251465)));
20903 laserAlphaMultiplier = 0.2f;
20904 return 0.33f;
20905 case "Zoomo":
20906 return 0.77f;
20907 case "Random":
20908 return Main.rand.NextFloat();
20909 case "bluemagic123":
20910 case "blushiemagic":
20911 return 0.55f + (float)Math.Cos(Main.time / 120.0 * 6.2831854820251465) * 0.1f;
20912 }
20913 }
20914 return (float)(int)laserIndex / 6f;
20915 }
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...

References Terraria.Utils.GetLerpValue(), Terraria.Projectile.owner, Terraria.Utils.PingPongFrom01To010(), Terraria.Main.player, Terraria.Main.rand, Terraria.Main.rgbToHsl(), Terraria.Main.time, Terraria.Main.timeForVisualEffects, and Terraria.Utils.Turn01ToCyclic010().

+ Here is the call graph for this function: