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

◆ UpdateTeleportVisuals()

void Terraria.Player.UpdateTeleportVisuals ( )
inline

Definition at line 14640 of file Player.cs.

14641 {
14642 //IL_003e: Unknown result type (might be due to invalid IL or missing references)
14643 //IL_004a: Unknown result type (might be due to invalid IL or missing references)
14644 //IL_0055: Unknown result type (might be due to invalid IL or missing references)
14645 //IL_005b: Unknown result type (might be due to invalid IL or missing references)
14646 //IL_0066: Unknown result type (might be due to invalid IL or missing references)
14647 //IL_0082: Unknown result type (might be due to invalid IL or missing references)
14648 //IL_0088: Unknown result type (might be due to invalid IL or missing references)
14649 //IL_00c1: Unknown result type (might be due to invalid IL or missing references)
14650 //IL_00cb: Unknown result type (might be due to invalid IL or missing references)
14651 //IL_00d0: Unknown result type (might be due to invalid IL or missing references)
14652 //IL_0105: Unknown result type (might be due to invalid IL or missing references)
14653 //IL_0111: Unknown result type (might be due to invalid IL or missing references)
14654 //IL_011c: Unknown result type (might be due to invalid IL or missing references)
14655 //IL_0122: Unknown result type (might be due to invalid IL or missing references)
14656 //IL_012d: Unknown result type (might be due to invalid IL or missing references)
14657 //IL_0149: Unknown result type (might be due to invalid IL or missing references)
14658 //IL_014f: Unknown result type (might be due to invalid IL or missing references)
14659 //IL_0188: Unknown result type (might be due to invalid IL or missing references)
14660 //IL_0192: Unknown result type (might be due to invalid IL or missing references)
14661 //IL_0197: Unknown result type (might be due to invalid IL or missing references)
14662 //IL_028b: Unknown result type (might be due to invalid IL or missing references)
14663 //IL_0290: Unknown result type (might be due to invalid IL or missing references)
14664 //IL_0215: Unknown result type (might be due to invalid IL or missing references)
14665 //IL_0238: Unknown result type (might be due to invalid IL or missing references)
14666 //IL_023e: Unknown result type (might be due to invalid IL or missing references)
14667 //IL_0251: Unknown result type (might be due to invalid IL or missing references)
14668 //IL_0256: Unknown result type (might be due to invalid IL or missing references)
14669 //IL_02bb: Unknown result type (might be due to invalid IL or missing references)
14670 if (!(teleportTime > 0f))
14671 {
14672 return;
14673 }
14674 if (teleportStyle == 0)
14675 {
14676 if ((float)Main.rand.Next(100) <= 100f * teleportTime * 2f)
14677 {
14678 int num = Dust.NewDust(new Vector2((float)getRect().X, (float)getRect().Y), getRect().Width, getRect().Height, 159);
14679 Main.dust[num].scale = teleportTime * 1.5f;
14680 Main.dust[num].noGravity = true;
14681 Dust obj = Main.dust[num];
14682 obj.velocity *= 1.1f;
14683 }
14684 }
14685 else if (teleportStyle == 1)
14686 {
14687 if ((float)Main.rand.Next(100) <= 100f * teleportTime)
14688 {
14689 int num2 = Dust.NewDust(new Vector2((float)getRect().X, (float)getRect().Y), getRect().Width, getRect().Height, 164);
14690 Main.dust[num2].scale = teleportTime * 1.5f;
14691 Main.dust[num2].noGravity = true;
14692 Dust obj2 = Main.dust[num2];
14693 obj2.velocity *= 1.1f;
14694 }
14695 }
14696 else if (teleportStyle == 2)
14697 {
14698 teleportTime = 0.005f;
14699 }
14700 else if (teleportStyle == 3)
14701 {
14702 teleportTime = 0.005f;
14703 }
14704 else if (teleportStyle == 4)
14705 {
14706 teleportTime -= 0.02f;
14707 if ((float)Main.rand.Next(100) <= 100f * teleportTime)
14708 {
14709 Dust obj3 = Main.dust[Dust.NewDust(position, width, height, 263)];
14711 obj3.noLight = true;
14712 obj3.noGravity = true;
14713 obj3.scale = 1.2f;
14714 obj3.fadeIn = 0.4f;
14715 }
14716 }
14717 else if (teleportStyle == 9)
14718 {
14719 Rectangle hitbox = base.Hitbox;
14720 ((Rectangle)(ref hitbox)).Inflate(5, 5);
14721 if ((float)Main.rand.Next(100) <= 100f * teleportTime)
14722 {
14724 }
14725 }
14726 teleportTime -= 0.005f;
14727 }
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
static Color GetPortalColor(int colorIndex)
static void SpawnInWorldDust(int tileStyle, Rectangle dustBox)
int lastPortalColorIndex
Definition Player.cs:3109
int lastTeleportPylonStyleUsed
Definition Player.cs:3115
Rectangle getRect()
Definition Player.cs:41240
float teleportTime
Definition Player.cs:1189

References Terraria.Main.dust, Terraria.GameContent.PortalHelper.GetPortalColor(), Terraria.Player.getRect(), Terraria.Entity.height, Terraria.Player.lastPortalColorIndex, Terraria.Player.lastTeleportPylonStyleUsed, Terraria.Dust.NewDust(), Terraria.Entity.position, Terraria.Main.rand, Terraria.GameContent.TeleportPylonsSystem.SpawnInWorldDust(), Terraria.Player.teleportStyle, Terraria.Player.teleportTime, and Terraria.Entity.width.

Referenced by Terraria.Player.Update().

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