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

◆ AI_167_SparkleGuitar()

void Terraria.Projectile.AI_167_SparkleGuitar ( )
inlineprivate

Definition at line 38494 of file Projectile.cs.

38495 {
38496 float num = 90f;
38497 if ((localAI[0] += 1f) >= num - 1f)
38498 {
38499 Kill();
38500 return;
38501 }
38502 float num2 = localAI[0] / num;
38503 Vector2 center = Main.player[owner].Center;
38504 Vector2 vector = new Vector2(ai[0], ai[1]);
38506 Vector2 value = center + vector2 * 2f;
38507 Vector2 value2 = vector + vector2 * (1f - num2 * 3f);
38508 base.Center = Vector2.CatmullRom(value, center, vector, value2, num2);
38509 int num3 = type;
38510 if (num3 == 856)
38511 {
38512 Lighting.AddLight(base.Center, Color.HotPink.ToVector3() * 0.3f);
38513 rotation = (float)Math.PI * 2f * num2 * 1f;
38514 }
38515 }
const double PI
Definition Math.cs:16
Vector2 velocity
Definition Entity.cs:16
static Vector2 CatmullRom(Vector2 value1, Vector2 value2, Vector2 value3, Vector2 value4, float amount)
Definition Vector2.cs:273

References Terraria.Lighting.AddLight(), Microsoft.Xna.Framework.Vector2.CatmullRom(), Microsoft.Xna.Framework.Color.HotPink, System.Math.PI, Terraria.Main.player, System.type, and System.value.