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

◆ AI_155_SpawnRopeIn()

void Terraria.Projectile.AI_155_SpawnRopeIn ( int x,
int y )
inlineprivate

Definition at line 42433 of file Projectile.cs.

42434 {
42435 Vector2 vector = new Vector2(x * 16 + 8, y * 16 + 8);
42436 if (Main.rand.Next(4) != 0)
42437 {
42438 Gore gore = Gore.NewGoreDirect(vector, Vector2.Zero, Main.rand.Next(61, 64));
42439 gore.velocity = Main.rand.NextVector2Circular(1.5f, 0.8f);
42440 gore.velocity.X += 0.1f * (float)((gore.velocity.X > 0f) ? 1 : (-1));
42441 gore.position = vector - new Vector2(16f, 16f);
42442 gore.alpha = 170;
42443 }
42444 for (int i = 0; i < 5; i++)
42445 {
42446 if (Main.rand.Next(8) == 0)
42447 {
42448 Dust.NewDustDirect(vector + new Vector2(-8f), 16, 16, 31, 0f, 0f, 100, Color.Transparent).velocity *= 0.4f;
42449 }
42450 Dust dust = Dust.NewDustDirect(vector + new Vector2(-8f), 16, 16, 27, 0f, 0f, 100, Color.Transparent, 1.7f);
42451 dust.velocity *= 2f;
42452 dust.noGravity = true;
42453 }
42454 }
static Color Transparent
Definition Color.cs:76

References Terraria.Dust.NewDustDirect(), Terraria.Gore.NewGoreDirect(), Terraria.Main.rand, Microsoft.Xna.Framework.Color.Transparent, Terraria.Gore.velocity, Microsoft.Xna.Framework.Vector2.X, and Microsoft.Xna.Framework.Vector2.Zero.