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

◆ GeyserTrap()

static void Terraria.Wiring.GeyserTrap ( int i,
int j )
inlinestaticprivate

Definition at line 2744 of file Wiring.cs.

2745 {
2746 Tile tile = Main.tile[i, j];
2747 if (tile.type != 443)
2748 {
2749 return;
2750 }
2751 int num = tile.frameX / 36;
2752 int num2 = i - (tile.frameX - num * 36) / 18;
2753 if (CheckMech(num2, j, 200))
2754 {
2757 int num3 = 654;
2758 int damage = 20;
2759 if (num < 2)
2760 {
2761 zero = new Vector2(num2 + 1, j) * 16f;
2762 zero2 = new Vector2(0f, -8f);
2763 }
2764 else
2765 {
2766 zero = new Vector2(num2 + 1, j + 1) * 16f;
2767 zero2 = new Vector2(0f, 8f);
2768 }
2769 if (num3 != 0)
2770 {
2771 Projectile.NewProjectile(GetProjectileSource(num2, j), (int)zero.X, (int)zero.Y, zero2.X, zero2.Y, num3, damage, 2f, Main.myPlayer);
2772 }
2773 }
2774 }
static bool CheckMech(int i, int j, int time)
Definition Wiring.cs:429
static IEntitySource GetProjectileSource(int sourceTileX, int sourceTileY)
Definition Wiring.cs:955

References Terraria.Main.myPlayer, Terraria.Projectile.NewProjectile(), Terraria.Main.tile, Terraria.Tile.type, and Microsoft.Xna.Framework.Vector2.Zero.

Referenced by Terraria.Wiring.HitSwitch(), and Terraria.Wiring.HitWireSingle().