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

◆ RocketBootVisuals()

void Terraria.Player.RocketBootVisuals ( )
inlineprivate

Definition at line 27605 of file Player.cs.

27606 {
27607 int num = height;
27608 if (gravDir == -1f)
27609 {
27610 num = 4;
27611 }
27612 for (int i = 0; i < 2; i++)
27613 {
27614 int num2 = ((i == 0) ? 2 : (-2));
27615 Rectangle r = ((i != 0) ? new Rectangle((int)position.X + width - 4, (int)position.Y + num - 10, 8, 8) : new Rectangle((int)position.X - 4, (int)position.Y + num - 10, 8, 8));
27616 if (direction == -1)
27617 {
27618 r.X -= 4;
27619 }
27620 int type = 6;
27621 float scale = 2.5f;
27622 int alpha = 100;
27623 float num3 = 1f;
27624 Vector2 vector = new Vector2((float)(-num2) - velocity.X * 0.3f, 2f * gravDir - velocity.Y * 0.3f);
27625 Dust dust;
27626 switch (vanityRocketBoots)
27627 {
27628 case 5:
27629 type = 6;
27630 scale = 2.5f;
27631 break;
27632 case 1:
27634 {
27635 type = 27;
27636 scale = 1.5f;
27637 }
27638 break;
27639 case 3:
27640 type = 76;
27641 scale = 1f;
27642 alpha = 20;
27643 break;
27644 case 2:
27645 if (fairyBoots)
27646 {
27647 type = Main.rand.NextFromList(new short[6] { 61, 61, 61, 242, 64, 63 });
27648 scale = 2f;
27649 alpha = 120;
27650 }
27651 else
27652 {
27653 type = 16;
27654 scale = 1.5f;
27655 alpha = 20;
27656 }
27657 break;
27658 case 4:
27659 {
27660 int num4 = Main.rand.Next(6);
27661 r.Y += 2 * (int)gravDir;
27662 if (num4 == 0 || num4 == 1)
27663 {
27664 dust = Dust.NewDustDirect(r.TopLeft(), r.Width, r.Height, 278, 0f, 0f, 100, Color.Lerp(Color.LimeGreen, Color.White, Main.rand.NextFloat() * 0.3f));
27665 dust.shader = GameShaders.Armor.GetSecondaryShader(cShoe, this);
27666 dust.scale = 0.66f;
27667 dust.noGravity = true;
27668 dust.velocity *= 0.25f;
27669 dust.velocity -= velocity * 0.5f;
27670 dust.velocity += vector * 0.5f;
27671 dust.position += dust.velocity * 4f;
27672 if (Main.rand.Next(5) == 0)
27673 {
27674 dust.fadeIn = 0.8f;
27675 }
27676 continue;
27677 }
27678 type = 107;
27679 alpha = 100;
27680 scale = 0.7f;
27681 num3 = 0.5f;
27682 break;
27683 }
27684 }
27685 dust = Dust.NewDustDirect(r.TopLeft(), r.Width, r.Height, type, 0f, 0f, alpha, default(Color), scale);
27686 dust.shader = GameShaders.Armor.GetSecondaryShader(cShoe, this);
27687 dust.velocity += vector;
27688 dust.velocity *= num3;
27689 switch (vanityRocketBoots)
27690 {
27691 case 5:
27692 dust.noGravity = true;
27693 break;
27694 case 1:
27695 dust.noGravity = true;
27696 break;
27697 case 2:
27698 dust.velocity *= 0.1f;
27699 break;
27700 case 3:
27701 dust.velocity *= 0.05f;
27702 dust.velocity.Y += 0.15f;
27703 dust.noLight = true;
27704 if (Main.rand.Next(2) == 0)
27705 {
27706 dust.noGravity = true;
27707 dust.scale = 1.75f;
27708 }
27709 break;
27710 }
27711 if (fairyBoots)
27712 {
27713 dust.noGravity = true;
27714 dust.noLightEmittence = true;
27715 }
27716 }
27717 }
Vector2 velocity
Definition Entity.cs:16
Vector2 position
Definition Entity.cs:14
static ArmorShaderDataSet Armor
Definition GameShaders.cs:7
bool socialShadowRocketBoots
Definition Player.cs:1229
int vanityRocketBoots
Definition Player.cs:2325
static Color Lerp(Color value1, Color value2, float amount)
Definition Color.cs:491

References Terraria.Graphics.Shaders.GameShaders.Armor, Microsoft.Xna.Framework.Color.Lerp(), Microsoft.Xna.Framework.Color.LimeGreen, Terraria.Dust.NewDustDirect(), Terraria.Main.rand, System.type, and Microsoft.Xna.Framework.Color.White.