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

◆ AI_172_HallowBossRainbowPelletStorm()

void Terraria.Projectile.AI_172_HallowBossRainbowPelletStorm ( )
inlineprivate

Definition at line 37547 of file Projectile.cs.

37548 {
37549 if (localAI[1] <= 90f)
37550 {
37551 localAI[1] += 1f;
37552 scale = 0.5f;
37553 Opacity = 0.5f;
37554 float lerpValue = Utils.GetLerpValue(0f, 90f, localAI[1]);
37555 scale = MathHelper.Lerp(5f, 1f, lerpValue);
37556 Opacity = 1f - (1f - lerpValue * lerpValue);
37557 return;
37558 }
37559 scale = 1f;
37560 Opacity = 1f;
37561 float num = 150f + 10f * (float)AI_172_GetPelletStormsCount();
37562 localAI[0] += 1f;
37563 if (localAI[0] >= num)
37564 {
37565 Kill();
37566 return;
37567 }
37569 rotation = 0f;
37571 for (int i = 0; i < num2; i++)
37572 {
37573 HallowBossPelletStormInfo hallowBossPelletStormInfo = AI_172_GetPelletStormInfo(i);
37574 for (int j = 0; j < hallowBossPelletStormInfo.BulletsInStorm; j++)
37575 {
37576 if (hallowBossPelletStormInfo.IsValid(j))
37577 {
37578 hallowBossPelletStormInfo.GetBulletPosition(j, base.Center);
37579 }
37580 }
37581 }
37582 }
static float Lerp(float value1, float value2, float amount)
Definition MathHelper.cs:53
Vector2 velocity
Definition Entity.cs:16
HallowBossPelletStormInfo AI_172_GetPelletStormInfo(int stormIndex)
int AI_172_GetPelletStormsCount()

References Terraria.Utils.GetLerpValue(), Microsoft.Xna.Framework.MathHelper.Lerp(), and Microsoft.Xna.Framework.Vector2.Zero.