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

◆ TreeGrowFX()

static void Terraria.WorldGen.TreeGrowFX ( int x,
int y,
int height,
int treeGore,
bool hitTree = false )
inlinestatic

Definition at line 21502 of file WorldGen.cs.

21503 {
21504 Vector2 vector = new Vector2(x, y) * 16f + new Vector2(8f, 8f);
21505 if (treeGore == 1278)
21506 {
21507 TreeGrowFX_AshShake(x, y, height, hitTree);
21508 return;
21509 }
21510 for (int num = 0; num > -height; num--)
21511 {
21512 float num2 = 10f;
21513 Vector2 vector2 = new Vector2(5f, 7f);
21514 Gore.NewGore(vector + new Vector2(-16f, num * 16) - vector2, Utils.RandomVector2(Main.rand, 0f - num2, num2), treeGore, 0.7f + Main.rand.NextFloat() * 0.6f);
21515 Gore.NewGore(vector + new Vector2(0f, num * 16) - vector2, Utils.RandomVector2(Main.rand, 0f - num2, num2), treeGore, 0.7f + Main.rand.NextFloat() * 0.6f);
21516 Gore.NewGore(vector + new Vector2(16f, num * 16) - vector2, Utils.RandomVector2(Main.rand, 0f - num2, num2), treeGore, 0.7f + Main.rand.NextFloat() * 0.6f);
21517 if (num == -height + 1)
21518 {
21519 int num3 = 20;
21520 if (hitTree)
21521 {
21522 num3 = 5;
21523 }
21524 for (int i = 0; i < num3; i++)
21525 {
21526 Gore.NewGore(vector + new Vector2(0f, num * 16 - 40) + Utils.RandomVector2(Main.rand, -40f, 40f) - vector2, Utils.RandomVector2(Main.rand, -10f, 10f), treeGore, 0.7f + Main.rand.NextFloat() * 0.6f);
21527 }
21528 }
21529 }
21530 }
static void TreeGrowFX_AshShake(int x, int y, int height, bool hitTree=false)

References Terraria.Gore.NewGore(), Terraria.Main.rand, and Terraria.Utils.RandomVector2().

Referenced by Terraria.MessageBuffer.GetData().