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

◆ CreateImpactExplosion2_SleepyOctopod()

void Terraria.Projectile.CreateImpactExplosion2_SleepyOctopod ( Vector2 explosionOrigin,
bool causedShockwaves )
inlineprivate

Definition at line 58623 of file Projectile.cs.

58624 {
58625 Vector2 spinningpoint = new Vector2(7f, 0f);
58626 Vector2 vector = new Vector2(1f, 0.7f);
58627 Color color = new Color(20, 255, 100, 200);
58628 for (float num = 0f; num < 25f; num += 1f)
58629 {
58630 Vector2 vector2 = spinningpoint.RotatedBy(num * ((float)Math.PI * 2f) / 25f) * vector;
58631 Dust dust = Dust.NewDustDirect(position, width, height, 55);
58632 dust.alpha = 0;
58633 if (!causedShockwaves)
58634 {
58635 dust.alpha = 50;
58636 }
58637 dust.color = color;
58638 dust.position = explosionOrigin + vector2;
58639 dust.velocity.Y -= 3f;
58640 dust.velocity.X *= 0.5f;
58641 dust.fadeIn = 0.5f + Main.rand.NextFloat() * 0.5f;
58642 dust.noLight = true;
58643 }
58644 if (!causedShockwaves)
58645 {
58646 for (float num2 = 0f; num2 < 25f; num2 += 1f)
58647 {
58648 Vector2 vector3 = spinningpoint.RotatedBy(num2 * ((float)Math.PI * 2f) / 25f) * vector;
58649 Dust dust2 = Dust.NewDustDirect(position, width, height, 55);
58650 dust2.alpha = 100;
58651 dust2.color = color;
58652 dust2.position = explosionOrigin + vector3;
58653 dust2.velocity.Y -= 5f;
58654 dust2.velocity.X *= 0.8f;
58655 dust2.fadeIn = 0.5f + Main.rand.NextFloat() * 0.5f;
58656 dust2.noLight = true;
58657 }
58658 }
58659 }
const double PI
Definition Math.cs:16
Vector2 position
Definition Entity.cs:14

References Terraria.Dust.NewDustDirect(), System.Math.PI, and Terraria.Main.rand.