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

◆ DrawProjWithStarryTrail()

void Terraria.Main.DrawProjWithStarryTrail ( Projectile proj,
Color projectileColor,
SpriteEffects dir )
inlineprivate

Definition at line 48311 of file Main.cs.

48312 {
48313 //IL_0025: Unknown result type (might be due to invalid IL or missing references)
48314 //IL_002a: Unknown result type (might be due to invalid IL or missing references)
48315 //IL_002b: Unknown result type (might be due to invalid IL or missing references)
48316 //IL_0035: Unknown result type (might be due to invalid IL or missing references)
48317 //IL_003a: Unknown result type (might be due to invalid IL or missing references)
48318 //IL_0091: Unknown result type (might be due to invalid IL or missing references)
48319 //IL_009d: Unknown result type (might be due to invalid IL or missing references)
48320 //IL_00a2: Unknown result type (might be due to invalid IL or missing references)
48321 //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
48322 //IL_00c2: Unknown result type (might be due to invalid IL or missing references)
48323 //IL_00cb: Unknown result type (might be due to invalid IL or missing references)
48324 //IL_00d0: Unknown result type (might be due to invalid IL or missing references)
48325 //IL_00ba: Unknown result type (might be due to invalid IL or missing references)
48326 //IL_00bf: Unknown result type (might be due to invalid IL or missing references)
48327 //IL_025d: Unknown result type (might be due to invalid IL or missing references)
48328 //IL_0262: Unknown result type (might be due to invalid IL or missing references)
48329 //IL_0263: Unknown result type (might be due to invalid IL or missing references)
48330 //IL_028b: Unknown result type (might be due to invalid IL or missing references)
48331 //IL_0290: Unknown result type (might be due to invalid IL or missing references)
48332 //IL_029a: Unknown result type (might be due to invalid IL or missing references)
48333 //IL_02b7: Unknown result type (might be due to invalid IL or missing references)
48334 //IL_02bc: Unknown result type (might be due to invalid IL or missing references)
48335 //IL_02c0: Unknown result type (might be due to invalid IL or missing references)
48336 //IL_02d8: Unknown result type (might be due to invalid IL or missing references)
48337 //IL_02e2: Unknown result type (might be due to invalid IL or missing references)
48338 //IL_02e9: Unknown result type (might be due to invalid IL or missing references)
48339 //IL_030f: Unknown result type (might be due to invalid IL or missing references)
48340 //IL_0310: Unknown result type (might be due to invalid IL or missing references)
48341 //IL_0316: Unknown result type (might be due to invalid IL or missing references)
48342 //IL_031b: Unknown result type (might be due to invalid IL or missing references)
48343 //IL_0320: Unknown result type (might be due to invalid IL or missing references)
48344 //IL_0322: Unknown result type (might be due to invalid IL or missing references)
48345 //IL_032c: Unknown result type (might be due to invalid IL or missing references)
48346 //IL_0333: Unknown result type (might be due to invalid IL or missing references)
48347 //IL_0338: Unknown result type (might be due to invalid IL or missing references)
48348 //IL_0342: Unknown result type (might be due to invalid IL or missing references)
48349 //IL_0345: Unknown result type (might be due to invalid IL or missing references)
48350 //IL_034a: Unknown result type (might be due to invalid IL or missing references)
48351 //IL_0354: Unknown result type (might be due to invalid IL or missing references)
48352 //IL_0357: Unknown result type (might be due to invalid IL or missing references)
48353 //IL_035c: Unknown result type (might be due to invalid IL or missing references)
48354 //IL_0366: Unknown result type (might be due to invalid IL or missing references)
48355 //IL_0369: Unknown result type (might be due to invalid IL or missing references)
48356 //IL_036e: Unknown result type (might be due to invalid IL or missing references)
48357 //IL_0378: Unknown result type (might be due to invalid IL or missing references)
48358 //IL_0382: Unknown result type (might be due to invalid IL or missing references)
48359 //IL_0384: Unknown result type (might be due to invalid IL or missing references)
48360 //IL_0389: Unknown result type (might be due to invalid IL or missing references)
48361 //IL_038e: Unknown result type (might be due to invalid IL or missing references)
48362 //IL_0390: Unknown result type (might be due to invalid IL or missing references)
48363 //IL_0395: Unknown result type (might be due to invalid IL or missing references)
48364 //IL_03a1: Unknown result type (might be due to invalid IL or missing references)
48365 //IL_03a7: Unknown result type (might be due to invalid IL or missing references)
48366 //IL_03a9: Unknown result type (might be due to invalid IL or missing references)
48367 //IL_03ae: Unknown result type (might be due to invalid IL or missing references)
48368 //IL_03b3: Unknown result type (might be due to invalid IL or missing references)
48369 //IL_03ba: Unknown result type (might be due to invalid IL or missing references)
48370 //IL_03c4: Unknown result type (might be due to invalid IL or missing references)
48371 //IL_03db: Unknown result type (might be due to invalid IL or missing references)
48372 //IL_03dd: Unknown result type (might be due to invalid IL or missing references)
48373 //IL_03e2: Unknown result type (might be due to invalid IL or missing references)
48374 //IL_03e7: Unknown result type (might be due to invalid IL or missing references)
48375 //IL_03e9: Unknown result type (might be due to invalid IL or missing references)
48376 //IL_03ee: Unknown result type (might be due to invalid IL or missing references)
48377 //IL_0400: Unknown result type (might be due to invalid IL or missing references)
48378 //IL_0406: Unknown result type (might be due to invalid IL or missing references)
48379 //IL_0408: Unknown result type (might be due to invalid IL or missing references)
48380 //IL_040d: Unknown result type (might be due to invalid IL or missing references)
48381 //IL_0412: Unknown result type (might be due to invalid IL or missing references)
48382 //IL_0419: Unknown result type (might be due to invalid IL or missing references)
48383 //IL_0423: Unknown result type (might be due to invalid IL or missing references)
48384 //IL_043a: Unknown result type (might be due to invalid IL or missing references)
48385 //IL_043c: Unknown result type (might be due to invalid IL or missing references)
48386 //IL_0441: Unknown result type (might be due to invalid IL or missing references)
48387 //IL_0446: Unknown result type (might be due to invalid IL or missing references)
48388 //IL_0448: Unknown result type (might be due to invalid IL or missing references)
48389 //IL_044d: Unknown result type (might be due to invalid IL or missing references)
48390 //IL_045f: Unknown result type (might be due to invalid IL or missing references)
48391 //IL_0465: Unknown result type (might be due to invalid IL or missing references)
48392 //IL_0467: Unknown result type (might be due to invalid IL or missing references)
48393 //IL_046c: Unknown result type (might be due to invalid IL or missing references)
48394 //IL_0471: Unknown result type (might be due to invalid IL or missing references)
48395 //IL_0478: Unknown result type (might be due to invalid IL or missing references)
48396 //IL_0482: Unknown result type (might be due to invalid IL or missing references)
48397 //IL_0497: Unknown result type (might be due to invalid IL or missing references)
48398 //IL_049d: Unknown result type (might be due to invalid IL or missing references)
48399 //IL_04a2: Unknown result type (might be due to invalid IL or missing references)
48400 //IL_04a7: Unknown result type (might be due to invalid IL or missing references)
48401 //IL_00f4: Unknown result type (might be due to invalid IL or missing references)
48402 //IL_00f9: Unknown result type (might be due to invalid IL or missing references)
48403 //IL_0105: Unknown result type (might be due to invalid IL or missing references)
48404 //IL_0107: Unknown result type (might be due to invalid IL or missing references)
48405 //IL_0159: Unknown result type (might be due to invalid IL or missing references)
48406 //IL_015e: Unknown result type (might be due to invalid IL or missing references)
48407 //IL_0191: Unknown result type (might be due to invalid IL or missing references)
48408 //IL_019b: Unknown result type (might be due to invalid IL or missing references)
48409 //IL_01a5: Unknown result type (might be due to invalid IL or missing references)
48410 //IL_01aa: Unknown result type (might be due to invalid IL or missing references)
48411 //IL_01b9: Unknown result type (might be due to invalid IL or missing references)
48412 //IL_01c3: Unknown result type (might be due to invalid IL or missing references)
48413 //IL_01cd: Unknown result type (might be due to invalid IL or missing references)
48414 //IL_01d2: Unknown result type (might be due to invalid IL or missing references)
48415 //IL_04f1: Unknown result type (might be due to invalid IL or missing references)
48416 //IL_04f3: Unknown result type (might be due to invalid IL or missing references)
48417 //IL_04f8: Unknown result type (might be due to invalid IL or missing references)
48418 //IL_04fd: Unknown result type (might be due to invalid IL or missing references)
48419 //IL_04ff: Unknown result type (might be due to invalid IL or missing references)
48420 //IL_0504: Unknown result type (might be due to invalid IL or missing references)
48421 //IL_050b: Unknown result type (might be due to invalid IL or missing references)
48422 //IL_050f: Unknown result type (might be due to invalid IL or missing references)
48423 //IL_051c: Unknown result type (might be due to invalid IL or missing references)
48424 //IL_05b7: Unknown result type (might be due to invalid IL or missing references)
48425 //IL_05bc: Unknown result type (might be due to invalid IL or missing references)
48426 //IL_05c1: Unknown result type (might be due to invalid IL or missing references)
48427 //IL_05c6: Unknown result type (might be due to invalid IL or missing references)
48428 //IL_05e8: Unknown result type (might be due to invalid IL or missing references)
48429 //IL_05ed: Unknown result type (might be due to invalid IL or missing references)
48430 //IL_05ef: Unknown result type (might be due to invalid IL or missing references)
48431 //IL_05f1: Unknown result type (might be due to invalid IL or missing references)
48432 //IL_05fb: Unknown result type (might be due to invalid IL or missing references)
48433 //IL_0600: Unknown result type (might be due to invalid IL or missing references)
48434 //IL_0602: Unknown result type (might be due to invalid IL or missing references)
48435 //IL_0604: Unknown result type (might be due to invalid IL or missing references)
48436 //IL_060b: Unknown result type (might be due to invalid IL or missing references)
48437 //IL_060e: Unknown result type (might be due to invalid IL or missing references)
48438 Color color = default(Color);
48439 ((Color)(ref color))._002Ector(255, 255, 255, ((Color)(ref projectileColor)).A - proj.alpha);
48440 Vector2 vector = proj.velocity;
48441 Color color2 = Color.Blue * 0.1f;
48442 Vector2 spinningpoint = default(Vector2);
48443 ((Vector2)(ref spinningpoint))._002Ector(0f, -4f);
48444 float num = 0f;
48445 float t = ((Vector2)(ref vector)).Length();
48446 float num2 = Utils.GetLerpValue(3f, 5f, t, clamped: true);
48447 bool flag = true;
48448 if (proj.type == 856 || proj.type == 857)
48449 {
48450 vector = proj.position - proj.oldPos[1];
48451 float num3 = ((Vector2)(ref vector)).Length();
48452 vector = ((num3 != 0f) ? (vector * (5f / num3)) : Vector2.UnitY);
48453 Vector2 origin = default(Vector2);
48454 ((Vector2)(ref origin))._002Ector(proj.ai[0], proj.ai[1]);
48455 Vector2 center = player[proj.owner].Center;
48456 float lerpValue = Utils.GetLerpValue(0f, 120f, origin.Distance(center), clamped: true);
48457 float num4 = 90f;
48458 if (proj.type == 857)
48459 {
48460 num4 = 60f;
48461 flag = false;
48462 }
48463 float lerpValue2 = Utils.GetLerpValue(num4, num4 * (5f / 6f), proj.localAI[0], clamped: true);
48464 float lerpValue3 = Utils.GetLerpValue(0f, 120f, proj.Center.Distance(center), clamped: true);
48466 lerpValue2 *= Utils.GetLerpValue(0f, 15f, proj.localAI[0], clamped: true);
48467 color2 = Color.HotPink * 0.15f * (lerpValue2 * lerpValue);
48468 if (proj.type == 857)
48469 {
48470 color2 = proj.GetFirstFractalColor() * 0.15f * (lerpValue2 * lerpValue);
48471 }
48472 ((Vector2)(ref spinningpoint))._002Ector(0f, -2f);
48473 float lerpValue4 = Utils.GetLerpValue(num4, num4 * (2f / 3f), proj.localAI[0], clamped: true);
48474 lerpValue4 *= Utils.GetLerpValue(0f, 20f, proj.localAI[0], clamped: true);
48475 num = -0.3f * (1f - lerpValue4);
48476 num += -1f * Utils.GetLerpValue(15f, 0f, proj.localAI[0], clamped: true);
48477 num *= lerpValue;
48479 }
48480 Vector2 val = proj.Center + vector;
48481 Texture2D value = TextureAssets.Projectile[proj.type].Value;
48482 _ = Utils.Size(new Rectangle(0, 0, value.Width, value.Height)) / 2f;
48483 Texture2D value2 = TextureAssets.Extra[91].Value;
48484 Rectangle value3 = value2.Frame();
48485 Vector2 origin2 = default(Vector2);
48486 ((Vector2)(ref origin2))._002Ector((float)value3.Width / 2f, 10f);
48487 _ = Color.Cyan * 0.5f * num2;
48488 Vector2 vector2 = default(Vector2);
48489 ((Vector2)(ref vector2))._002Ector(0f, proj.gfxOffY);
48490 float num5 = (float)timeForVisualEffects / 60f;
48491 Vector2 vector3 = val + vector * 0.5f;
48492 Color color3 = Color.White * 0.5f * num2;
48493 ((Color)(ref color3)).A = 0;
48494 Color color4 = color2 * num2;
48495 ((Color)(ref color4)).A = 0;
48496 Color color5 = color2 * num2;
48497 ((Color)(ref color5)).A = 0;
48498 Color color6 = color2 * num2;
48499 ((Color)(ref color6)).A = 0;
48500 float num6 = vector.ToRotation();
48501 EntitySpriteDraw(value2, vector3 - screenPosition + vector2 + spinningpoint.RotatedBy((float)Math.PI * 2f * num5), value3, color4, num6 + (float)Math.PI / 2f, origin2, 1.5f + num, (SpriteEffects)0);
48502 EntitySpriteDraw(value2, vector3 - screenPosition + vector2 + spinningpoint.RotatedBy((float)Math.PI * 2f * num5 + (float)Math.PI * 2f / 3f), value3, color5, num6 + (float)Math.PI / 2f, origin2, 1.1f + num, (SpriteEffects)0);
48503 EntitySpriteDraw(value2, vector3 - screenPosition + vector2 + spinningpoint.RotatedBy((float)Math.PI * 2f * num5 + 4.1887903f), value3, color6, num6 + (float)Math.PI / 2f, origin2, 1.3f + num, (SpriteEffects)0);
48504 Vector2 vector4 = val - vector * 0.5f;
48505 for (float num7 = 0f; num7 < 1f; num7 += 0.5f)
48506 {
48507 float num8 = num5 % 0.5f / 0.5f;
48508 num8 = (num8 + num7) % 1f;
48509 float num9 = num8 * 2f;
48510 if (num9 > 1f)
48511 {
48512 num9 = 2f - num9;
48513 }
48514 EntitySpriteDraw(value2, vector4 - screenPosition + vector2, value3, color3 * num9, num6 + (float)Math.PI / 2f, origin2, 0.3f + num8 * 0.5f, (SpriteEffects)0);
48515 }
48516 if (flag)
48517 {
48518 float rotation = proj.rotation + proj.localAI[1];
48519 _ = (float)timeForVisualEffects / 240f;
48524 if (globalTimeWrappedHourly >= 1f)
48525 {
48527 }
48529 Vector2 position = proj.Center - screenPosition;
48530 instance.LoadItem(75);
48531 Texture2D value4 = TextureAssets.Item[75].Value;
48532 Rectangle rectangle = value4.Frame(1, 8);
48533 EntitySpriteDraw(origin: rectangle.Size() / 2f, texture: value4, position: position, sourceRectangle: rectangle, color: color, rotation: rotation, scale: proj.scale, effects: (SpriteEffects)0);
48534 }
48535 }
static Asset< Texture2D >[] Projectile
static Asset< Texture2D >[] Item
static Asset< Texture2D >[] Extra
static void EntitySpriteDraw(Texture2D texture, Vector2 position, Rectangle? sourceRectangle, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float worthless=0f)
Definition Main.cs:48883
static double timeForVisualEffects
Definition Main.cs:1377
static Main instance
Definition Main.cs:311
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 Player[] player
Definition Main.cs:1960
static float GlobalTimeWrappedHourly
Definition Main.cs:433

References Terraria.Graphics.Light.Color, Terraria.Main.EntitySpriteDraw(), Terraria.GameContent.TextureAssets.Extra, Terraria.Utils.GetLerpValue(), Terraria.Main.GlobalTimeWrappedHourly, Terraria.Main.instance, Terraria.GameContent.TextureAssets.Item, Terraria.Main.player, Terraria.GameContent.TextureAssets.Projectile, Terraria.Main.screenPosition, Terraria.Utils.Size(), and Terraria.Main.timeForVisualEffects.

Referenced by Terraria.Main.DrawProj_DrawNormalProjs().

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