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

◆ BoulderExplosion()

void Terraria.Projectile.BoulderExplosion ( )
inlineprivate

Definition at line 59382 of file Projectile.cs.

59383 {
59384 int num = Main.rand.Next(2, 5);
59385 for (int i = 0; i < num; i++)
59386 {
59387 float num2 = 8f;
59388 Vector2 vector = new Vector2(Main.rand.NextFloat() - 0.5f, (0f - Main.rand.NextFloat()) / 2f);
59389 vector.Normalize();
59390 vector *= num2;
59391 int num3 = (int)((double)damage * 0.75);
59392 int num4 = NewProjectile(GetProjectileSource_FromThis(), base.Center.X, base.Center.Y, vector.X, vector.Y, 1005, num3, 0f, Main.myPlayer);
59393 Main.projectile[num4].timeLeft = 300;
59394 }
59395 }
IEntitySource GetProjectileSource_FromThis()
static int NewProjectile(IEntitySource spawnSource, Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner=-1, float ai0=0f, float ai1=0f, float ai2=0f)

References Terraria.Main.myPlayer, Terraria.Main.projectile, and Terraria.Main.rand.