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

◆ DrawProj_TheHorsemansBlade()

void Terraria.Main.DrawProj_TheHorsemansBlade ( Projectile proj)
inlineprivate

Definition at line 32465 of file Main.cs.

32466 {
32467 //IL_0001: Unknown result type (might be due to invalid IL or missing references)
32468 //IL_0006: Unknown result type (might be due to invalid IL or missing references)
32469 //IL_000b: Unknown result type (might be due to invalid IL or missing references)
32470 //IL_0010: Unknown result type (might be due to invalid IL or missing references)
32471 //IL_0025: Unknown result type (might be due to invalid IL or missing references)
32472 //IL_002a: Unknown result type (might be due to invalid IL or missing references)
32473 //IL_002b: Unknown result type (might be due to invalid IL or missing references)
32474 //IL_002c: Unknown result type (might be due to invalid IL or missing references)
32475 //IL_0036: Unknown result type (might be due to invalid IL or missing references)
32476 //IL_003b: Unknown result type (might be due to invalid IL or missing references)
32477 //IL_005d: Unknown result type (might be due to invalid IL or missing references)
32478 //IL_00b5: Unknown result type (might be due to invalid IL or missing references)
32479 //IL_00ba: Unknown result type (might be due to invalid IL or missing references)
32480 //IL_00bf: Unknown result type (might be due to invalid IL or missing references)
32481 //IL_00c4: Unknown result type (might be due to invalid IL or missing references)
32482 //IL_00c8: Unknown result type (might be due to invalid IL or missing references)
32483 //IL_00cd: Unknown result type (might be due to invalid IL or missing references)
32484 //IL_0121: Unknown result type (might be due to invalid IL or missing references)
32485 //IL_0122: Unknown result type (might be due to invalid IL or missing references)
32486 //IL_0128: Unknown result type (might be due to invalid IL or missing references)
32487 //IL_012c: Unknown result type (might be due to invalid IL or missing references)
32488 //IL_0133: Unknown result type (might be due to invalid IL or missing references)
32489 //IL_015c: Unknown result type (might be due to invalid IL or missing references)
32490 //IL_015f: Unknown result type (might be due to invalid IL or missing references)
32491 //IL_0190: Unknown result type (might be due to invalid IL or missing references)
32492 //IL_0197: Unknown result type (might be due to invalid IL or missing references)
32493 //IL_01a1: Unknown result type (might be due to invalid IL or missing references)
32494 //IL_01a6: Unknown result type (might be due to invalid IL or missing references)
32495 //IL_01c1: Unknown result type (might be due to invalid IL or missing references)
32496 //IL_01c5: Unknown result type (might be due to invalid IL or missing references)
32497 //IL_01cf: Unknown result type (might be due to invalid IL or missing references)
32498 //IL_01d4: Unknown result type (might be due to invalid IL or missing references)
32499 //IL_0213: Unknown result type (might be due to invalid IL or missing references)
32500 //IL_0214: Unknown result type (might be due to invalid IL or missing references)
32501 //IL_021a: Unknown result type (might be due to invalid IL or missing references)
32502 //IL_0221: Unknown result type (might be due to invalid IL or missing references)
32503 //IL_023b: Unknown result type (might be due to invalid IL or missing references)
32504 //IL_023e: Unknown result type (might be due to invalid IL or missing references)
32505 //IL_0255: Unknown result type (might be due to invalid IL or missing references)
32506 //IL_0256: Unknown result type (might be due to invalid IL or missing references)
32507 //IL_025c: Unknown result type (might be due to invalid IL or missing references)
32508 //IL_0260: Unknown result type (might be due to invalid IL or missing references)
32509 //IL_0267: Unknown result type (might be due to invalid IL or missing references)
32510 //IL_0271: Unknown result type (might be due to invalid IL or missing references)
32511 //IL_027c: Unknown result type (might be due to invalid IL or missing references)
32512 //IL_027f: Unknown result type (might be due to invalid IL or missing references)
32513 //IL_0296: Unknown result type (might be due to invalid IL or missing references)
32514 //IL_0297: Unknown result type (might be due to invalid IL or missing references)
32515 //IL_029d: Unknown result type (might be due to invalid IL or missing references)
32516 //IL_02a1: Unknown result type (might be due to invalid IL or missing references)
32517 //IL_02a8: Unknown result type (might be due to invalid IL or missing references)
32518 //IL_02b2: Unknown result type (might be due to invalid IL or missing references)
32519 //IL_02bd: Unknown result type (might be due to invalid IL or missing references)
32520 //IL_02c3: Unknown result type (might be due to invalid IL or missing references)
32521 //IL_02da: Unknown result type (might be due to invalid IL or missing references)
32522 //IL_02e2: Unknown result type (might be due to invalid IL or missing references)
32523 //IL_02ec: Unknown result type (might be due to invalid IL or missing references)
32524 //IL_02f6: Unknown result type (might be due to invalid IL or missing references)
32525 //IL_02fd: Unknown result type (might be due to invalid IL or missing references)
32526 //IL_0317: Unknown result type (might be due to invalid IL or missing references)
32527 //IL_031a: Unknown result type (might be due to invalid IL or missing references)
32528 //IL_0331: Unknown result type (might be due to invalid IL or missing references)
32529 //IL_0339: Unknown result type (might be due to invalid IL or missing references)
32530 //IL_0343: Unknown result type (might be due to invalid IL or missing references)
32531 //IL_034d: Unknown result type (might be due to invalid IL or missing references)
32532 //IL_0354: Unknown result type (might be due to invalid IL or missing references)
32533 //IL_036e: Unknown result type (might be due to invalid IL or missing references)
32534 //IL_0377: Unknown result type (might be due to invalid IL or missing references)
32535 //IL_038e: Unknown result type (might be due to invalid IL or missing references)
32536 //IL_0396: Unknown result type (might be due to invalid IL or missing references)
32537 //IL_03a0: Unknown result type (might be due to invalid IL or missing references)
32538 //IL_03aa: Unknown result type (might be due to invalid IL or missing references)
32539 //IL_03b1: Unknown result type (might be due to invalid IL or missing references)
32540 //IL_03cb: Unknown result type (might be due to invalid IL or missing references)
32541 //IL_03d4: Unknown result type (might be due to invalid IL or missing references)
32542 //IL_0432: Unknown result type (might be due to invalid IL or missing references)
32543 //IL_0435: Unknown result type (might be due to invalid IL or missing references)
32544 //IL_044d: Unknown result type (might be due to invalid IL or missing references)
32545 //IL_0454: Unknown result type (might be due to invalid IL or missing references)
32546 //IL_0459: Unknown result type (might be due to invalid IL or missing references)
32547 //IL_045e: Unknown result type (might be due to invalid IL or missing references)
32548 //IL_0471: Unknown result type (might be due to invalid IL or missing references)
32549 //IL_0483: Unknown result type (might be due to invalid IL or missing references)
32550 //IL_048a: Unknown result type (might be due to invalid IL or missing references)
32551 //IL_0491: Unknown result type (might be due to invalid IL or missing references)
32552 //IL_0496: Unknown result type (might be due to invalid IL or missing references)
32553 //IL_04d1: Unknown result type (might be due to invalid IL or missing references)
32554 //IL_04d8: Unknown result type (might be due to invalid IL or missing references)
32555 //IL_04dd: Unknown result type (might be due to invalid IL or missing references)
32556 //IL_04e4: Unknown result type (might be due to invalid IL or missing references)
32557 //IL_0504: Unknown result type (might be due to invalid IL or missing references)
32558 //IL_0531: Unknown result type (might be due to invalid IL or missing references)
32559 //IL_0549: Unknown result type (might be due to invalid IL or missing references)
32560 //IL_0550: Unknown result type (might be due to invalid IL or missing references)
32561 //IL_0555: Unknown result type (might be due to invalid IL or missing references)
32562 //IL_055a: Unknown result type (might be due to invalid IL or missing references)
32563 //IL_0563: Unknown result type (might be due to invalid IL or missing references)
32564 //IL_0575: Unknown result type (might be due to invalid IL or missing references)
32565 //IL_057c: Unknown result type (might be due to invalid IL or missing references)
32566 //IL_0586: Unknown result type (might be due to invalid IL or missing references)
32567 //IL_058b: Unknown result type (might be due to invalid IL or missing references)
32568 //IL_05c4: Unknown result type (might be due to invalid IL or missing references)
32569 //IL_05cb: Unknown result type (might be due to invalid IL or missing references)
32570 //IL_05d0: Unknown result type (might be due to invalid IL or missing references)
32571 //IL_05d7: Unknown result type (might be due to invalid IL or missing references)
32572 Vector2 vector = proj.Center - screenPosition;
32574 Rectangle rectangle = asset.Frame(1, 4);
32575 Vector2 origin = rectangle.Size() / 2f;
32576 float num = proj.scale * 1.1f;
32577 SpriteEffects effects = (SpriteEffects)((!(proj.ai[0] >= 0f)) ? 2 : 0);
32578 float num2 = proj.localAI[0] / proj.ai[1];
32579 float num3 = Utils.Remap(num2, 0f, 0.6f, 0f, 1f) * Utils.Remap(num2, 0.6f, 1f, 1f, 0f);
32580 float num4 = 0.975f;
32581 Color color6 = Lighting.GetColor(proj.Center.ToTileCoordinates());
32582 Vector3 val = ((Color)(ref color6)).ToVector3();
32583 float fromValue = ((Vector3)(ref val)).Length() / (float)Math.Sqrt(3.0);
32584 fromValue = Utils.Remap(fromValue, 0.2f, 1f, 0f, 1f);
32585 Color color = default(Color);
32586 ((Color)(ref color))._002Ector(193, 43, 43);
32587 spriteBatch.Draw(asset.Value, vector, (Rectangle?)rectangle, color * fromValue * num3, proj.rotation + proj.ai[0] * ((float)Math.PI / 4f) * -1f * (1f - num2), origin, num, effects, 0f);
32588 Color color2 = default(Color);
32589 ((Color)(ref color2))._002Ector(247, 115, 0);
32590 Color color3 = default(Color);
32591 ((Color)(ref color3))._002Ector(255, 202, 130);
32592 Color color4 = Color.White * num3 * 0.5f;
32593 ((Color)(ref color4)).A = (byte)((float)(int)((Color)(ref color4)).A * (1f - fromValue));
32594 Color color5 = color4 * fromValue * 0.5f;
32595 ((Color)(ref color5)).G = (byte)((float)(int)((Color)(ref color5)).G * fromValue);
32596 ((Color)(ref color5)).B = (byte)((float)(int)((Color)(ref color5)).R * (0.25f + fromValue * 0.75f));
32597 spriteBatch.Draw(asset.Value, vector, (Rectangle?)rectangle, color5 * 0.15f, proj.rotation + proj.ai[0] * 0.01f, origin, num, effects, 0f);
32598 spriteBatch.Draw(asset.Value, vector, (Rectangle?)rectangle, color3 * fromValue * num3 * 0.3f, proj.rotation, origin, num, effects, 0f);
32599 spriteBatch.Draw(asset.Value, vector, (Rectangle?)rectangle, color2 * fromValue * num3 * 0.5f, proj.rotation, origin, num * num4, effects, 0f);
32600 spriteBatch.Draw(asset.Value, vector, (Rectangle?)asset.Frame(1, 4, 0, 3), Color.White * 0.6f * num3, proj.rotation + proj.ai[0] * 0.01f, origin, num, effects, 0f);
32601 spriteBatch.Draw(asset.Value, vector, (Rectangle?)asset.Frame(1, 4, 0, 3), Color.White * 0.5f * num3, proj.rotation + proj.ai[0] * -0.05f, origin, num * 0.8f, effects, 0f);
32602 spriteBatch.Draw(asset.Value, vector, (Rectangle?)asset.Frame(1, 4, 0, 3), Color.White * 0.4f * num3, proj.rotation + proj.ai[0] * -0.1f, origin, num * 0.6f, effects, 0f);
32603 for (float num5 = 0f; num5 < 8f; num5 += 1f)
32604 {
32605 float num6 = proj.rotation + proj.ai[0] * num5 * ((float)Math.PI * -2f) * 0.025f + Utils.Remap(num2, 0f, 1f, 0f, (float)Math.PI / 4f) * proj.ai[0];
32606 Vector2 drawpos = vector + num6.ToRotationVector2() * ((float)asset.Width() * 0.5f - 6f) * num;
32607 float num7 = num5 / 9f;
32608 DrawPrettyStarSparkle(proj.Opacity, (SpriteEffects)0, drawpos, new Color(255, 255, 255, 0) * num3 * num7, color3, num2, 0f, 0.5f, 0.5f, 1f, num6, new Vector2(0f, Utils.Remap(num2, 0f, 1f, 3f, 0f)) * num, Vector2.One * num);
32609 }
32610 Vector2 drawpos2 = vector + (proj.rotation + Utils.Remap(num2, 0f, 1f, 0f, (float)Math.PI / 4f) * proj.ai[0]).ToRotationVector2() * ((float)asset.Width() * 0.5f - 4f) * num;
32611 DrawPrettyStarSparkle(proj.Opacity, (SpriteEffects)0, drawpos2, new Color(255, 255, 255, 0) * num3 * 0.5f, color3, num2, 0f, 0.5f, 0.5f, 1f, (float)Math.PI / 4f, new Vector2(Utils.Remap(num2, 0f, 1f, 4f, 1f)) * num, Vector2.One * num);
32612 }
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: