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

◆ WingAirVisuals()

void Terraria.Player.WingAirVisuals ( )
inlineprivate

Definition at line 28516 of file Player.cs.

28517 {
28518 bool noLightEmittence = wingsLogic != wings;
28519 if (wings == 10 && Main.rand.Next(2) == 0)
28520 {
28521 int num = 4;
28522 if (direction == 1)
28523 {
28524 num = -40;
28525 }
28526 int num2 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num, position.Y + (float)(height / 2) - 15f), 30, 30, 76, 0f, 0f, 50, default(Color), 0.6f);
28527 Main.dust[num2].fadeIn = 1.1f;
28528 Main.dust[num2].noGravity = true;
28529 Main.dust[num2].noLight = true;
28530 Main.dust[num2].velocity *= 0.3f;
28531 Main.dust[num2].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
28532 }
28533 if (wings == 34 && Main.rand.Next(2) == 0)
28534 {
28535 int num3 = 4;
28536 if (direction == 1)
28537 {
28538 num3 = -40;
28539 }
28540 int num4 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num3, position.Y + (float)(height / 2) - 15f), 30, 30, 261, 0f, 0f, 50, default(Color), 0.6f);
28541 Main.dust[num4].fadeIn = 1.1f;
28542 Main.dust[num4].noGravity = true;
28543 Main.dust[num4].noLight = true;
28544 Main.dust[num4].noLightEmittence = noLightEmittence;
28545 Main.dust[num4].velocity *= 0.3f;
28546 Main.dust[num4].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
28547 }
28548 _ = wings;
28549 _ = 40;
28550 _ = wings;
28551 _ = 44;
28552 if (wings == 9 && Main.rand.Next(2) == 0)
28553 {
28554 int num5 = 4;
28555 if (direction == 1)
28556 {
28557 num5 = -40;
28558 }
28559 int num6 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num5, position.Y + (float)(height / 2) - 15f), 30, 30, 6, 0f, 0f, 200, default(Color), 2f);
28560 Main.dust[num6].noGravity = true;
28561 Main.dust[num6].noLightEmittence = noLightEmittence;
28562 Main.dust[num6].velocity *= 0.3f;
28563 Main.dust[num6].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
28564 }
28565 if (wings == 6 && Main.rand.Next(4) == 0)
28566 {
28567 int num7 = 4;
28568 if (direction == 1)
28569 {
28570 num7 = -40;
28571 }
28572 int num8 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num7, position.Y + (float)(height / 2) - 15f), 30, 30, 55, 0f, 0f, 200);
28573 Main.dust[num8].velocity *= 0.3f;
28574 Main.dust[num8].noLightEmittence = noLightEmittence;
28575 Main.dust[num8].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
28576 }
28577 if (wings == 5 && Main.rand.Next(3) == 0)
28578 {
28579 int num9 = 6;
28580 if (direction == 1)
28581 {
28582 num9 = -30;
28583 }
28584 int num10 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num9, position.Y), 18, height, 58, 0f, 0f, 255, default(Color), 1.2f);
28585 Main.dust[num10].noLightEmittence = noLightEmittence;
28586 Main.dust[num10].velocity *= 0.3f;
28587 Main.dust[num10].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
28588 }
28589 if (wings == 26)
28590 {
28591 int num11 = 6;
28592 if (direction == 1)
28593 {
28594 num11 = -30;
28595 }
28596 int num12 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num11, position.Y), 18, height, 217, 0f, 0f, 100, default(Color), 1.4f);
28597 Main.dust[num12].noGravity = true;
28598 Main.dust[num12].noLight = true;
28599 Main.dust[num12].velocity /= 4f;
28600 Main.dust[num12].velocity -= velocity;
28601 Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
28602 if (Main.rand.Next(2) == 0)
28603 {
28604 num11 = -24;
28605 if (direction == 1)
28606 {
28607 num11 = 12;
28608 }
28609 float num13 = position.Y;
28610 if (gravDir == -1f)
28611 {
28612 num13 += (float)(height / 2);
28613 }
28614 num12 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num11, num13), 12, height / 2, 217, 0f, 0f, 100, default(Color), 1.4f);
28615 Main.dust[num12].noGravity = true;
28616 Main.dust[num12].noLight = true;
28617 Main.dust[num12].velocity /= 4f;
28618 Main.dust[num12].velocity -= velocity;
28619 Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
28620 }
28621 }
28622 if (wings == 37)
28623 {
28624 int num14 = 6;
28625 if (direction == 1)
28626 {
28627 num14 = -30;
28628 }
28629 Dust dust = Dust.NewDustDirect(new Vector2(position.X + (float)(width / 2) + (float)num14, position.Y), 24, height, Utils.SelectRandom<int>(Main.rand, 31, 31, 31), 0f, 0f, 100);
28630 dust.noGravity = true;
28631 dust.noLight = true;
28632 dust.velocity /= 4f;
28633 dust.velocity -= velocity / 2f;
28634 dust.shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
28635 if (dust.type == 55)
28636 {
28637 dust.noGravity = true;
28638 dust.velocity *= 2f;
28639 dust.color = Color.Red;
28640 }
28641 if (Main.rand.Next(3) == 0)
28642 {
28643 num14 = -24;
28644 if (direction == 1)
28645 {
28646 num14 = 12;
28647 }
28648 float num15 = position.Y;
28649 if (gravDir == -1f)
28650 {
28651 num15 += (float)(height / 2);
28652 }
28653 dust = Dust.NewDustDirect(new Vector2(position.X + (float)(width / 2) + (float)num14, num15), 16, height / 2, Utils.SelectRandom<int>(Main.rand, 31, 31, 31), 0f, 0f, 100);
28654 dust.noGravity = true;
28655 dust.noLight = true;
28656 dust.velocity /= 4f;
28657 dust.velocity -= velocity / 2f;
28658 dust.shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
28659 if (dust.type == 55)
28660 {
28661 dust.noGravity = true;
28662 dust.velocity *= 2f;
28663 dust.color = Color.Red;
28664 }
28665 }
28666 }
28667 if (wings == 29 && Main.rand.Next(3) == 0)
28668 {
28669 int num16 = 4;
28670 if (direction == 1)
28671 {
28672 num16 = -40;
28673 }
28674 int num17 = Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num16, position.Y + (float)(height / 2) - 15f), 30, 30, 6, 0f, 0f, 100, default(Color), 2.4f);
28675 Main.dust[num17].noGravity = true;
28676 Main.dust[num17].velocity *= 0.3f;
28677 Main.dust[num17].noLightEmittence = noLightEmittence;
28678 if (Main.rand.Next(10) == 0)
28679 {
28680 Main.dust[num17].fadeIn = 2f;
28681 }
28682 Main.dust[num17].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
28683 }
28684 if (wings != 31)
28685 {
28686 return;
28687 }
28688 if (Main.rand.Next(6) == 0)
28689 {
28690 int num18 = 4;
28691 if (direction == 1)
28692 {
28693 num18 = -40;
28694 }
28695 Dust obj = Main.dust[Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num18, position.Y + (float)(height / 2) - 15f), 30, 30, 86)];
28696 obj.noGravity = true;
28697 obj.scale = 1f;
28698 obj.fadeIn = 1.2f;
28699 obj.velocity *= 0.2f;
28700 obj.noLight = true;
28701 obj.shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
28702 }
28703 if (Main.rand.Next(3) == 0)
28704 {
28705 int num19 = 4;
28706 if (direction == 1)
28707 {
28708 num19 = -40;
28709 }
28710 Dust obj2 = Main.dust[Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num19, position.Y + (float)(height / 2) - 15f), 30, 30, 240)];
28711 obj2.noGravity = true;
28712 obj2.scale = 1.2f;
28713 obj2.velocity *= 0.2f;
28714 obj2.alpha = 200;
28715 obj2.shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
28716 }
28717 if (Main.rand.Next(2) != 0)
28718 {
28719 return;
28720 }
28721 if (Main.rand.Next(6) == 0)
28722 {
28723 int num20 = -24;
28724 if (direction == 1)
28725 {
28726 num20 = 12;
28727 }
28728 float num21 = position.Y;
28729 if (gravDir == -1f)
28730 {
28731 num21 += (float)(height / 2);
28732 }
28733 Dust obj3 = Main.dust[Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num20, num21), 12, height / 2, 86)];
28734 obj3.noGravity = true;
28735 obj3.scale = 1f;
28736 obj3.fadeIn = 1.2f;
28737 obj3.velocity *= 0.2f;
28738 obj3.noLight = true;
28739 obj3.shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
28740 }
28741 if (Main.rand.Next(3) == 0)
28742 {
28743 int num20 = -24;
28744 if (direction == 1)
28745 {
28746 num20 = 12;
28747 }
28748 float num22 = position.Y;
28749 if (gravDir == -1f)
28750 {
28751 num22 += (float)(height / 2);
28752 }
28753 Dust obj4 = Main.dust[Dust.NewDust(new Vector2(position.X + (float)(width / 2) + (float)num20, num22), 12, height / 2, 240)];
28754 obj4.noGravity = true;
28755 obj4.scale = 1.2f;
28756 obj4.velocity *= 0.2f;
28757 obj4.alpha = 200;
28758 obj4.shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
28759 }
28760 }
Vector2 velocity
Definition Entity.cs:16
Vector2 position
Definition Entity.cs:14
static ArmorShaderDataSet Armor
Definition GameShaders.cs:7

References Terraria.Graphics.Shaders.GameShaders.Armor, Terraria.Main.dust, Terraria.Dust.NewDust(), Terraria.Dust.NewDustDirect(), System.obj, Terraria.Main.rand, Microsoft.Xna.Framework.Color.Red, and Terraria.Dust.type.