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

◆ DrawMurderAurora()

void Terraria.Main.DrawMurderAurora ( Projectile proj)
inlineprivate

Definition at line 33189 of file Main.cs.

33190 {
33192 Vector2 origin = value.Size() / 2f;
33193 float num = GlobalTimeWrappedHourly % 10f / 10f;
33194 Vector2 vector = proj.Center - screenPosition;
33195 float[] array = new float[15];
33196 float[] array2 = new float[15];
33197 float[] array3 = new float[15];
33198 float[] array4 = new float[15];
33199 float[] array5 = new float[15];
33200 float num2 = 0.5f;
33201 int num3 = 210;
33202 num2 = Utils.GetLerpValue(0f, 60f, proj.timeLeft, clamped: true) * Utils.GetLerpValue(num3, num3 - 60, proj.timeLeft, clamped: true);
33203 float amount = Utils.GetLerpValue(0f, 60f, proj.timeLeft, clamped: true) * Utils.GetLerpValue(num3, 90f, proj.timeLeft, clamped: true);
33204 amount = MathHelper.Lerp(0.2f, 0.5f, amount);
33205 float num4 = 800f / (float)value.Width;
33206 float num5 = num4 * 0.8f;
33207 float num6 = (num4 - num5) / 15f;
33208 float num7 = 30f;
33209 float num8 = 300f;
33210 Vector2 vector2 = new Vector2(3f, 6f);
33211 for (int i = 0; i < 15; i++)
33212 {
33213 _ = (float)(i + 1) / 50f;
33214 float num9 = (float)Math.Sin(num * ((float)Math.PI * 2f) + (float)Math.PI / 2f + (float)i / 2f);
33215 array[i] = num9 * (num8 - (float)i * 3f);
33216 array2[i] = (float)Math.Sin(num * ((float)Math.PI * 2f) * 2f + (float)Math.PI / 3f + (float)i) * num7;
33217 array2[i] -= (float)i * 3f;
33218 array3[i] = (float)i / 15f * 2f + num;
33219 array3[i] = (num9 * 0.5f + 0.5f) * 0.6f + num;
33220 array4[i] = (float)(1.0 - Math.Pow(1f * (float)i / 15f, 2.0));
33221 array5[i] = num5 + (float)(i + 1) * num6;
33222 array5[i] *= 0.3f;
33223 Microsoft.Xna.Framework.Color color = hslToRgb(array3[i] % 1f, 1f, 0.5f) * num2 * amount;
33224 color.A /= 4;
33225 float rotation = (float)Math.PI / 2f + num9 * ((float)Math.PI / 4f) * -0.3f + (float)Math.PI * (float)i;
33226 EntitySpriteDraw(value, vector + new Vector2(array[i], array2[i]), null, color, rotation, origin, new Vector2(array5[i], array5[i]) * vector2, SpriteEffects.None);
33227 }
33228 }
static float Lerp(float value1, float value2, float amount)
Definition MathHelper.cs:53
static double Pow(double x, double y)
static double Sin(double a)
const double PI
Definition Math.cs:16
static Asset< Texture2D >[] Projectile
static Vector2 screenPosition
Definition Main.cs:1715
static Microsoft.Xna.Framework.Color hslToRgb(Vector3 hslVector)
Definition Main.cs:44913
static float GlobalTimeWrappedHourly
Definition Main.cs:405
static void EntitySpriteDraw(Texture2D texture, Vector2 position, Microsoft.Xna.Framework.Rectangle? sourceRectangle, Microsoft.Xna.Framework.Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float worthless=0f)
Definition Main.cs:34658

References System.array, Terraria.Main.EntitySpriteDraw(), Terraria.Utils.GetLerpValue(), Terraria.Main.GlobalTimeWrappedHourly, Terraria.Main.hslToRgb(), System.Text.RegularExpressions.i, Microsoft.Xna.Framework.MathHelper.Lerp(), System.Math.PI, System.Math.Pow(), Terraria.GameContent.TextureAssets.Projectile, Terraria.Main.screenPosition, System.Math.Sin(), System.value, and Microsoft.Xna.Framework.Graphics.Vector2.

Referenced by Terraria.Main.DrawProjDirect().