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

◆ CreateImpactExplosion2_FlailTileCollision()

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

Definition at line 58661 of file Projectile.cs.

58662 {
58663 Vector2 spinningpoint = new Vector2(7f, 0f);
58664 Vector2 vector = new Vector2(1f, 0.7f);
58665 Color color = Color.White * 0.5f;
58667 for (float num = 0f; num < 8f; num += 1f)
58668 {
58669 Vector2 vector3 = spinningpoint.RotatedBy(num * ((float)Math.PI * 2f) / 8f) * vector;
58670 Dust dust = Dust.NewDustDirect(position, width, height, 31);
58671 dust.alpha = 0;
58672 if (!causedShockwaves)
58673 {
58674 dust.alpha = 50;
58675 }
58676 dust.color = color;
58677 dust.position = explosionOrigin + vector3;
58678 dust.velocity.Y -= 0.8f;
58679 dust.velocity.X *= 0.8f;
58680 dust.fadeIn = 0.3f + Main.rand.NextFloat() * 0.4f;
58681 dust.scale = 0.4f;
58682 dust.noLight = true;
58683 dust.velocity += vector2 * 2f;
58684 }
58685 if (!causedShockwaves)
58686 {
58687 for (float num2 = 0f; num2 < 8f; num2 += 1f)
58688 {
58689 Vector2 vector4 = spinningpoint.RotatedBy(num2 * ((float)Math.PI * 2f) / 8f) * vector;
58690 Dust dust2 = Dust.NewDustDirect(position, width, height, 31);
58691 dust2.alpha = 100;
58692 dust2.color = color;
58693 dust2.position = explosionOrigin + vector4;
58694 dust2.velocity.Y -= 1f;
58695 dust2.velocity.X *= 0.4f;
58696 dust2.fadeIn = 0.3f + Main.rand.NextFloat() * 0.4f;
58697 dust2.scale = 0.4f;
58698 dust2.noLight = true;
58699 dust2.velocity += vector2 * 1.5f;
58700 }
58701 }
58702 }
const double PI
Definition Math.cs:16
Vector2 position
Definition Entity.cs:14

References Terraria.Dust.NewDustDirect(), System.Math.PI, Terraria.Main.rand, and Microsoft.Xna.Framework.Vector2.Zero.